收藏
回答

wx.getlocation 获取位置为负数?

调用获取定位方法wx.getlocation()拿到的结果为lng":-1017.291235,"lat":-1059.628755;时间:2022-04-29 11:40:33,仅出现一次,不能复现。

机型:系统版本:Android 11;机型:remmi;微信版本:8.0.20;网络:4G

 getLocation() {
    let _this = this;
    wx.getLocation({
      type: 'gcj02',
      success(res) {
        console.log(res)
        _this.setData({
          lat: res.latitude,
          lng: res.longitude
        })
        _this.getUssStore();
      },
      fail(res) {
        console.log(res)
        _this.getUssStore();
      }
    })
  }
回答关注问题邀请回答
收藏

3 个回答

  • Demons
    Demons
    2022-05-17

    请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

    2022-05-17
    有用
    回复
  • axing
    axing
    2022-12-30

    同样出现负数, 在uniapp项目中打包为ios项目运行出现

    2022-12-30
    有用
    回复
  • 往忆勿忧
    往忆勿忧
    2022-05-17

    不能复现的不具有参考性,可能系统抽了,程序不可能完美,

    2022-05-17
    有用
    回复
登录 后发表内容