IOS 定位返回问题
扫小程序二维码进入,在onShow方法里定位,设置type是‘gcj02’,第一次进入首页返回GPS坐标,然后进入别的页面,返回重新定位,返回国测距坐标
onShow: function () {
//定位当前城市
wx.getLocation({
type: ‘gcj02’,
success: (res) => { console.log(res) }
})
}
扫小程序二维码进入,在onShow方法里定位,设置type是‘gcj02’,第一次进入首页返回GPS坐标,然后进入别的页面,返回重新定位,返回国测距坐标
onShow: function () {
//定位当前城市
wx.getLocation({
type: ‘gcj02’,
success: (res) => { console.log(res) }
})
}