wx.getLocation获取地理位置 为什么不同地方获取的地理位置信息相差无几?
发布于 4 年前 作者 xiaqian 10842 次浏览 来自 官方Issues
wx.getLocation({
      type'gcj02',
      success(res) {
        console.log(res)
        const latitude = res.latitude
        const longitude = res.longitude
        that.setData({
          'fchomeVerifyParam.latitude': latitude,
          'fchomeVerifyParam.longitude': longitude,
          layerModel: false
        })
      },
      fail(err) {
        that.setData({
          switch1Checked: false
        })
        wx.showToast({
          title: '位置开启失败',
          icon: 'none'
        })
        //不允许打开定位
        wx.getSetting({
          success: (res) => {
            if (!res.authSetting['scope.userLocation']) {
              //打开提示框,提示前往设置页面
              that.setData({
                layerModel: true
              })
            }
          }
        })
      }
    })

这几个用户 相差几十公里。。

2 回复

你好,有自己测试过吗?

我用的是体验版 是因为没用正式版吗

回到顶部