流程:获取终点的坐标,根据终点的坐标,终点名称,终点详细地址,调起地图导航到第三方APP
<template>
<view @click="getLocation">xxx地址</view>
</template>
getLocation(e) {
let endPoint = JSON.stringify({
name: e.storeAddress,//终点详细地址
location: {
latitude: e.storeAddressLatitude, //目前所在纬度
longitude: e.storeAddressLongitude, //目前所在经度
},
});
wx.openLocation({
latitude: e.storeAddressLatitude, //要去的纬度-地址
longitude: e.storeAddressLongitude, //要去的经度-地址/
scale: 28, // 缩放比例
name: e.storeName,//终点名称
address: e.storeAddress,//终点详细地址
});
},