getLocation报错
发布于 6 年前 作者 xia31 12811 次浏览 来自 问答

按正常的代码写的,getLocation:fail:unsupported type,,,同样的代码,,安卓机部分获取不到地理位置,有部分可以,,请问这是什么原因???

2 回复

wx.getLocation({

      type: 'gcj02 ',

      success: function (res) {

        console.log(res.latitude+’–’+res.longitude);

        wx.setStorageSync(‘lat’,res.latitude);

        wx.setStorageSync(‘lng’,res.longitude);

      },

      fail: function(res) {

        console.log(res);

        console.log(‘定位失败’);

      }

    });

红米3,微信版本6.5.22

你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码示例。

回到顶部