getLocation,换了位置后经纬度坐标为什么不变?
发布于 7 年前 作者 xiuying93 9408 次浏览 来自 官方Issues

wx.getLocation在单位获取经纬度后,回家测试经纬度坐标不变化。海拔信息也不能显示,求指教

我使用的调用如下:

var that = this

wx.getLocation({

type: ‘gcj02’,

altitude: true,

isHighAccuracy: true,

success: function (res) {

console.log(res)

that.setData({

longitude: res.longitude,

latitude: res.latitude,

altitude: res.altitude,

})

},

})

开发环境版本

4 回复

也许是缓存,还没有刷新。

麻烦提供能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

另外,请扫描下图贴一下截图

你是每次更换地址打开小程序都需要更换定位是不?

你确定你的电脑支持GPS定位?

回到顶部