Tencent Map Mini Program SDK, calculates the distance between two locations, the data returned by success cannot be retrieved
qqmapsdk.calculateDistance({
from: {
latitude: that.data.start.location.lat,
longitude: that.data.start.location.lng
},
to: [{
latitude: that.data.end.location.lat,
longitude: that.data.end.location.lng
}],
success: function (res) {
let myDistance = res.result.elements[0].distance
console.log(res.result.elements[0].distance,"00獲取的距離是")
wx.setStorage({
key: 'myDistance',
data: res.result.elements[0].distance,
})
}