map.js
map:function(){
wx.getLocation({
type: 'gcj02', // 返回可以用于wx.openLocation的经纬度
success(res) {
const latitude = res.latitude
const longitude = res.longitude
wx.openLocation({
latitude,
longitude,
scale: 18
})
}
})
},
map.wxml
<button bindtap="map">点击我</button>
效果图:

3543

被折叠的 条评论
为什么被折叠?



