Skip to content
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

Merged
merged 35 commits into from
Mar 13, 2019
Merged

Conversation

modos189
Copy link
Contributor

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.

@modos189 modos189 added this to the IITC-CE v0.29 milestone Jan 18, 2019
@johnd0e
Copy link
Contributor

johnd0e commented Jan 18, 2019

It it possible to extend L.GridLayer via leaflet api (instead of monkey-patching)?

plugins/fix-china-map-offset.js Outdated Show resolved Hide resolved
plugins/fix-china-map-offset.js Outdated Show resolved Hide resolved
plugins/fix-china-map-offset.js Outdated Show resolved Hide resolved
@modos189
Copy link
Contributor Author

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(

@johnd0e
Copy link
Contributor

johnd0e commented Jan 18, 2019

https://leafletjs.com/examples/extending/extending-1-classes.html
https://leafletjs.com/examples/extending/extending-2-layers.html
It's seems a matter of using of L.GridLayer.extend(...) (or sort of).
May be we even could create separate leaflet-plugin, usable in any project, not only iitc).

@johnd0e
Copy link
Contributor

johnd0e commented Jan 19, 2019

As we named the plugin fix-china-map-offset we should include Baidu-related stuff here.

So our plugin api gets sort of complex..

@johnd0e
Copy link
Contributor

johnd0e commented Jan 19, 2019

P.S.
plugins/fix-china-offset.user.js → plugins/fix-china-map-offset.js
Need to be ...user.js

See #72

@johnd0e johnd0e mentioned this pull request Jan 27, 2019
johnd0e pushed a commit to johnd0e/ingress-intel-total-conversion that referenced this pull request Jan 28, 2019
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.
johnd0e pushed a commit to johnd0e/ingress-intel-total-conversion that referenced this pull request Feb 8, 2019
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.
@johnd0e johnd0e added the ATTENTION Feedback required label Feb 8, 2019
@johnd0e
Copy link
Contributor

johnd0e commented Feb 19, 2019

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

johnd0e pushed a commit to johnd0e/ingress-intel-total-conversion that referenced this pull request Feb 25, 2019
@johnd0e johnd0e mentioned this pull request Feb 25, 2019
4 tasks
johnd0e pushed a commit to johnd0e/ingress-intel-total-conversion that referenced this pull request Feb 25, 2019
johnd0e pushed a commit to johnd0e/ingress-intel-total-conversion that referenced this pull request Feb 28, 2019
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.
@johnd0e johnd0e removed the ATTENTION Feedback required label Mar 10, 2019
@johnd0e
Copy link
Contributor

johnd0e commented Mar 10, 2019

To be Squash and merge

@modos189 modos189 merged commit 8e8c2bc into master Mar 13, 2019
@johnd0e johnd0e deleted the fix-google-map-offsets-in-china branch March 14, 2019 09:16
johnd0e pushed a commit to johnd0e/ingress-intel-total-conversion that referenced this pull request Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants