https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.getLocation.html
wx.getLocation({
altitude: true,
isHighAccuracy: true,
success: function (location) {
console.log('获取定位成功', location);
that.setLatAndLng({ location: location, errCode: 0 })
that.setTime(() => {
console.log('需要清除储存的定位');
that.setLatAndLng(false)
}, 600000)
resolve({ location: location, errCode: 0 })
},
你好,确认经纬度是否存在问题呢?
设置 type 为 gcj02 试试
type改为 gcj02试试