调用内联地图
wxml:
<button bindtap="daohang">地图导航</button>
js:放入page中
daohang: function () {
wx.getLocation({//获取当前经纬度
type: 'wgs84', //返回可以用于wx.openLocation的经纬度,官方提示bug: iOS 6.3.30 type 参数不生效,只会返回 wgs84 类型的坐标信息
success: function (res) {
wx.openLocation({//使用微信内置地图查看位置。
latitude: 28.2315810000,//要去的纬度-地址
longitude: 112.8814770000,//要去的经度-地址
name: "我是地图导航",
address: '长沙市岳麓区中电软件园10栋'
})
}
})
},