-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix google map offsets in china #68
Conversation
…ng =( The plugin changes coordinates, but the change is not applied
…ap tiles (except Google maps)
lint: * `let` is not in es5 * 'HK_LENGTH' is assigned a value but never used * 'original' is defined but never used style: * == vs === * Mixed spaces and tabs * fix indents, missed/extra/trailing spaces, missed semi
divide PRCoords into 2 distinct functions: * plugin.fixChinaOffset.isInGoogle * plugin.fixChinaOffset.gcjObfs added stub for old fix-googlemap-china-offset plugin
It it possible to extend L.GridLayer via leaflet api (instead of monkey-patching)? |
I don't know, it's the only way I can do( |
Co-Authored-By: modos189 <yandex@modos189.ru>
Co-Authored-By: modos189 <yandex@modos189.ru>
Co-Authored-By: modos189 <yandex@modos189.ru>
https://leafletjs.com/examples/extending/extending-1-classes.html |
As we named the plugin
|
P.S. See #72 |
* Sources refactored to be closer to upstream https://github.com/Artoria2e5/PRCoords * Baidu support * Clarify comment about usage
do not touch L.GridLayer extend L.TileLayer and L.GridLayer.GoogleMutant
Sample China map to illustrate IITC-CE#68. Currently we can get road map with slightly different look. It is not straightforward, as there are not much info in official API [docs](https://lbs.amap.com/api/javascript-api/example/). I've played with some parameters, and you can see result after uncommenting corresponding lines. Some of the variants allow language change. P.S. Different map themes could be seen here: https://lbs.amap.com/api/javascript-api/example/personalized-map/set-theme-style. Unfortunately I've failed to figure out if it's possible to implement it in the plugin.
In current state it doesn't function. Maybe someone reimplement it in future. More info here: #64.
Sample China map to illustrate IITC-CE#68. Currently we can get road map with slightly different look. It is not straightforward, as there are not much info in official API [docs](https://lbs.amap.com/api/javascript-api/example/). I've played with some parameters, and you can see result after uncommenting corresponding lines. Some of the variants allow language change. P.S. Different map themes could be seen here: https://lbs.amap.com/api/javascript-api/example/personalized-map/set-theme-style. Unfortunately I've failed to figure out if it's possible to implement it in the plugin.
New feature idea: instead of hardcoding polygon we could allow import from draw-tools or geojson: http://geojson.io/#id=gist:johnd0e/2d61d1fec27da8fc09428fe82b84c3e6&map=4/37.85/104.06 |
Sample China map to illustrate IITC-CE#68. Currently we can get road map with slightly different look. It is not straightforward, as there are not much info in official API [docs](https://lbs.amap.com/api/javascript-api/example/). I've played with some parameters, and you can see result after uncommenting corresponding lines. Some of the variants allow language change. P.S. Different map themes could be seen here: https://lbs.amap.com/api/javascript-api/example/personalized-map/set-theme-style. Unfortunately I've failed to figure out if it's possible to implement it in the plugin.
update to 'Fix google map offsets in china'
To be Squash and merge |
So, this plugin fixes coordinate correction for some maps in China. #64
It is also now possible to enable correction not only for Google maps.