代码如下,获取到的GPS坐标实际便宜几百米。如何解决
uni.getLocation({
type: 'wgs84',
geocode: true,
isHighAccuracy: true,
highAccuracyExpireTime: 10000,
success: function (res) {
console.log('当前位置:' + JSON.stringify(res));
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
},
fail: function (error) {
console.log("定位失败原因==", JSON.stringify(error))
}
});
2 个回复
蔡cai - 开发的插件:https://ask.dcloud.net.cn/article/41539
type你换成gcj02看看
DCloud_UNI_JBB
可以去微信社区看看有没有解决方案,这个API是直接调用的微信API