js:
// 打開地圖導航
seeMap: function(e){
var me = this;
let id = e.currentTarget.dataset.id;
var stores = me.data.data.data;
var latitude = stores[id].latitude
var longitude = stores[id].longitude
var name = stores[id].store_name
var details = stores[id].details
wx.getLocation({
type: 'wgs84',
success: function (res) {
console.log('打開地圖導航去目的地');
wx.openLocation({//使用微信內置地圖查看位置。
latitude: Number(latitude),//要去的緯度-地址
longitude: Number(longitude),//要去的經度-地址
name: name,
address: details
})
}
})
},
wxml:
<view class="box2_son3_right2" data-id="{{index}}" bindtap="seeMap">
<image src="../../images/icon/adr.png"/>
</view>


參考來源:https://blog.csdn.net/qq_36538012/article/details/88396041