小程序wx:getLocation提高定位精度方法
先贴wx:getLocation官方文档链接,做小程序遇到问题先仔细看看官方文档
使用注意事项
提高精度方法
type换成gcj02//添加在js文件onload中
wx.getLocation({
type: 'gcj02',
success (res) {
const latitude = res.latitude
const longitude = res.longitude
const speed = res.speed
const accuracy = res.accuracy
原创
2020-05-13 22:17:55 ·
3027 阅读 ·
0 评论