2021-11-09
微信小程序实时监听位置变化api的使用
1.在需要使用位置跟踪的页面使用
wx.onLocationChange(function (res) {
console.log(res, '实时监听位置')
that.setData({
longitude: res.longitude,
latitude: res.latitude,
})
})
wx.startLocationUpdate({
success:
原创
2021-11-09 17:28:19 ·
44 阅读 ·
0 评论