获取到经纬度后,调用
wx.openLocation({ })方法即可:
实例如下:
js:
data: {
longitude:106.49626 ,
dimension:29.59921,
address:
function () {
var that =
this;
wx.openLocation({
latitude: parseFloat(that.data.dimension),
longitude: parseFloat(that.data.longitude)
})
},
wxml:
<
view
bindtap
=
"address">
在这里
</
view
>