leaflet-baidu icon indicating copy to clipboard operation
leaflet-baidu copied to clipboard

center is shifted in terms of tile

Open sureleo opened this issue 10 years ago • 9 comments

In the latest master, I have added a marker in the center. If you use selector in develop tools, you can figure out this marker is never in the tile that it is supposed to be in all zoom level. More or less shifted.
This is probably related to #13 and #15.
In zoom level 8, this is the most obvious.
image

sureleo avatar Jul 24 '14 02:07 sureleo

it seems like baidu GPS ponit is not the real one 2014-7-23 下午10:11于 "Shuo LI" [email protected]写道:

In the latest master, I have added a marker in the center. If you use selector in develop tools, you can figure out this marker is never in the tile that it is supposed to be in all zoom level. More or less shifted.

This is probably related to #13 https://github.com/sureleo/leaflet-baidu/issues/13 and #15 https://github.com/sureleo/leaflet-baidu/issues/15.

In zoom level 8, this is the most obvious.

[image: image] https://cloud.githubusercontent.com/assets/4485092/3682860/92e7de86-12d7-11e4-8b30-5093e3b8bae8.png

— Reply to this email directly or view it on GitHub https://github.com/sureleo/leaflet-baidu/issues/19.

facetothefate avatar Jul 24 '14 02:07 facetothefate

Exactly. Check 2.3 in this documentation. Moreover, Baidu Map displays differently with other maps in the same zoom level.

sureleo avatar Jul 24 '14 03:07 sureleo

I am not really understand. If the GPS is not the real one, how can we transform from the GPS point to the pixel point? Besides, BMap.MercatorProjection().pointToLngLat() is this method reliable?

facetothefate avatar Aug 05 '14 19:08 facetothefate

In README.md there is how Baidu map translates his CRS(coordinate system) to pixel and tile coordinate. Everything seems to be proprietary. BMap.MercatorProjection().pointToLngLat() is the only thing we could rely on. Otherwise, it is some complicated math.

sureleo avatar Aug 08 '14 04:08 sureleo

BTW, our website is about to release. I'm quite busy these days. I will probably work on this after next Tuesday. I'm also thinking using baidu static imagery api. Thanks for your contribution and patience.

sureleo avatar Aug 08 '14 04:08 sureleo

I have forked your repo, and change leaflet to its latest version(actually 'master' branch). And later I figured out the solution to #3 #13 #15 #18 #19. Unfortunately, there has one problem related to map bounds.

wsw0108 avatar Jun 19 '15 14:06 wsw0108

And you may have a look at below urls: http://wsw0108.github.io/leaflet-baidu/examples/baidu.html http://wsw0108.github.io/leaflet-baidu/examples/bounds-issue.html

wsw0108 avatar Jun 19 '15 15:06 wsw0108

Great! so we can continue this project maybe.

Zhifei Fang 方之斐

Member of Paradise Lab. University of Ottawa [image: View Zhifei Fang's LinkedIn profile]View Zhifei Fang's profile http://ca.linkedin.com/in/zhifeifang

http://thefaceteam.org/

2015-06-19 11:23 GMT-04:00 wsw0108 [email protected]:

And you may have a look at below urls: http://wsw0108.github.io/leaflet-baidu/examples/baidu.html http://wsw0108.github.io/leaflet-baidu/examples/bounds-issue.html

— Reply to this email directly or view it on GitHub https://github.com/sureleo/leaflet-baidu/issues/19#issuecomment-113547242 .

facetothefate avatar Jun 19 '15 17:06 facetothefate

I did test against leaflet stable, the bounds issue does not occurred. Seems it's done with leaflet stable.

You can visit http://wsw0108.github.io/leaflet-baidu/ to check.

wsw0108 avatar Jun 20 '15 14:06 wsw0108