开发安卓app,使用uni.getLocation得到的精度一直是30米,同样位置使用gps软件可以定位到5米精度,求指导
onLoad() {
setInterval(this.getLocation, 5000)
},
methods: {
getLocation: function() {
let that = this
uni.getLocation({
type: 'gcj20',
geocode:true,
altitude :true,
success: function(res) {
console.log(res)
that.latitude = res.latitude
that.longitude = res.longitude
that.accuracy = res.accuracy
that.poiName = res.address.poiName
that.markList = [{
latitude: res.latitude,
longitude: res.longitude,
iconPath: '../../static/water_detector_normal.png'
}]
}
})
},
}
我叫Bin (作者)
额...多谢哥们...好丢人
2020-01-02 09:27
1***@qq.com
是gcj02
2022-02-15 17:50