H5 wx.getLocation获取的定位偏差很大?
wx.getLocation({
type: 'gcj02',
isHighAccuracy:true,
highAccuracyExpireTime:10000,
success: (res)=> {
console.log(res);
this.latitude = res.latitude;
this.longitude = res.longitude;
this.covers[0].latitude=res.latitude;
this.covers[0].longitude=res.longitude;
console.log(this.covers[0].latitude);
console.log(this.covers[0].longitude);
},
fail:(res)=>{
this.until.tips('请打开手机的获取位置功能')
console.log("false:"+res)
}
});
返回的结果:
errMsg: "getLocation:ok"
horizontalAccuracy: undefined
latitude: 40.859788
longitude: 111.670215
verticalAccuracy: 0
根据腾讯地图查询的经纬度信息
40.865024,111.76304