wx.getLocation定位不准
发布于 5 年前 作者 guiying52 17094 次浏览 来自 问答
onReady: function (e) {
  let that = this
  wx.getLocation({
    success: function(res) {
      // that.openLocation(res)
    },
  })
  wx.getLocation({
    type: 'gcj02',
    success: function (res) {
      that.openLocation(res)
    },
  })
},
 
openLocation(res) {
  wx.openLocation({
    latitude: res.latitude,
    longitude: res.longitude,
  })
},

无论是wgs84还是gcj02,get到的位置和实际位置都有偏差,而且偏差一样。iOS10.3.3。

1 回复

后来解决了吗?哥们儿

回到顶部