We know that due to the infamous China GPS offset problem, GPS (WSG-84) map coordinates don't correspond exactly to the coordinate system that state-approved Chinese maps use (GCJ-02).
The question is, how does one make sure that placing a marker via the Baidu Maps API at the coordinates reported by navigator.geolocation.getCurrentPosition()
will match reality?
Would the GPS chip of a device manufactured or approved for use in China return coordinates that don't match the actual position of a user, in order to instead match he GJC-02 maps?
Does it matter if the user runs a Chinese navigator (e.g. Maxthon, or Google Chrome localized in Chinese), vs. a non-Chinese browser, e.g. Firefox in English?
Here's a JSBin that tests geolocation and uses the Baidu Maps coordinates conversion API. Unfortunately I'm not located in China so I can't test.
Here's the question:
Does the app above need to run the Baidu coordinates conversion on the coordinates it gets from navigator.geolocation.getCurrentPosition()
in order to show the location correctly on the Baidu Map, or not? Could someone located in China test, ideally with both a Chinese browser on a Chinese-manufactured device, and with a non-Chinese browser on a non-Chinese device?