// 新版打开导航 openMap:function(e){ var that = this wx.getLocation({ type: 'gcj02', //返回可以用于wx.openLocation的经纬度 success (res) { const name = that.data.address_name const address = that.data.address_details const latitude = Number(that.data.latitude) const longitude = Number(that.data.longitude) console.log(name) console.log(address) console.log(latitude) console.log(longitude) wx.openLocation({ name:that.data.address_name, address:that.data.address_details, latitude, longitude, scale: 16 }) }, fail (res){ console.error("res="+res); } }) },