wifi和4g定位原理不同,获取到的不一样的,小程序wx.getLocation 获取定位坐标,需要把type的值改成gcj02。如果使用wx.openlocation(),则使用gcj02,如果使用wx.chooselocation(),则使用wgs84。
一、精度修改为一致。
var currentLatitude = parseFloat(res.latitude).toFixed(6); //纬度
var currentLongitude =
wifi和4g定位原理不同,获取到的不一样的,小程序wx.getLocation 获取定位坐标,需要把type的值改成gcj02。如果使用wx.openlocation(),则使用gcj02,如果使用wx.chooselocation(),则使用wgs84。
一、精度修改为一致。
var currentLatitude = parseFloat(res.latitude).toFixed(6); //纬度
var currentLongitude =