小程序地址导航
let Info = {
Name : '天安门广场',
Address : '北京市东城区东长安街天安门广场',
latitudu : '39.90374',
longitude : '116.397827',
}
page({
//数据
data:{
Info :Info
},
// 地址导航
addressNavigation(){
console.log(this);
wx.openLocation({
type: "gcj02",
latitude: Number(this.data.Info.latitude),
longitude: Number(this.data.Info.longitude),
scale: 15,
name: this.data.Info.Name,
address: this.data.Info.Address,
success: (result)=>{},
fail: ()=>{},
complete: ()=>{}
});
},
})