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

Add Chinese Gaode Map base layer #1211

Closed
wants to merge 4 commits into from
Closed

Add Chinese Gaode Map base layer #1211

wants to merge 4 commits into from

Conversation

mutongx
Copy link

@mutongx mutongx commented May 9, 2017

Gaode Maps is a map service providing detailed and accurate map of China. Google Maps' data is much outdated and OSM is almost blank in some area of China.

This map layer includes loading map tiles from Gaode's server and fixing offset of the GCJ02 coordinate system.

return ret;
};

GaodeTransformer.prototype.isOutOfChina = function(lat, lng) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version of the 'box' has proven problematic before, as it covers large areas that are not China.
Can you confirm that this map utilizes GCJ even for areas outside of china?
e.g. Bhutan, for example, is inside your grid, but uses WGS84, not GCJ... please just verify that it works right.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually Gaode Maps have no map data outside China. You can see that there's only a boundary line around Bhutan and inside the country it's blank. I believe Chinese government would apply the same GCJ-02 offset to the whole Gaode Map but I think there is no way to confirm it because their algorithm is not public (the algorithm on the Internet is just a approximation).
I can confirm that map data of Hong Kong, which uses WGS-84 in Google Maps, uses GCJ-02 in Gaode Maps, and portal's locations are accurate.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someone reported that Gaode in Taiwan uses WGS-84 and I confirmed it's true. Fixed now.
I think this base layer should be China-only. If you zoom in you will see nothing outside China, even satellite images, so there's no need to worry about other areas as far as I'm concerned.

@Artoria2e5
Copy link

Hi, in #1188 I have a polygon instead of a box to make things better. That version of "China, but just the distorted part" does not include Taiwan, Hong Kong, and Macau; you may want to cut off the "hkmo" part in my comments to include HK and Macau. Anyway, you are free to use that polygon instead of a box.

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.

3 participants