【发布时间】:2015-06-10 18:42:14
【问题描述】:
我们知道这是由于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)。
问题是,如何确保通过百度地图 API 在navigator.geolocation.getCurrentPosition() 报告的坐标处放置标记与现实相符?
在中国制造或批准使用的设备的 GPS 芯片是否会返回与用户实际位置不匹配的坐标,以匹配 GJC-02 地图?
如果用户运行中文导航器(例如 Maxthon 或中文本地化的 Google Chrome)与非中文浏览器(例如火狐英文版?
这是JSBin that tests geolocation and uses the Baidu Maps coordinates conversion API。不幸的是,我不在中国,所以我无法测试。
问题来了:
上面的应用程序是否需要对从navigator.geolocation.getCurrentPosition()获取的坐标进行百度坐标转换才能在百度地图上正确显示位置?是否有人在中国进行测试,最好是在中国制造的设备上使用中文浏览器,在非中文设备上使用非中文浏览器?
【问题讨论】:
标签: javascript google-maps geolocation chinese-locale baidu