300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > 小程序地图定位 打开地图导航 选择位置

小程序地图定位 打开地图导航 选择位置

时间:2020-07-25 02:24:28

相关推荐

小程序地图定位 打开地图导航 选择位置

定位

openLocation: function () {wx.openLocation({longitude: 113.324520,latitude: 23.099994,name: 'T.I.T 创意园',address: '广州市海珠区新港中路397号'})}

选择位置

// app.json 中配置接口权限{"pages": ["pages/index/index"],"permission": {"scope.userLocation": {"desc": "你的位置信息将用于小程序位置接口的效果展示" // 高速公路行驶持续后台定位}}}//选择位置wx.chooseLocation({success(res){const latitude = res.latitudeconst longitude = res.longitudeconst speed = res.speedconst accuracy = res.accuracy},fail(res){}})

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。