mapControl{
id: 10,
position: {
left: 330 * wx.getStorageSync(“kScreenW”),
top: 260 * wx.getStorageSync(“kScreenH”),
width: 40 * wx.getStorageSync(“kScreenW”),
height: 40 * wx.getStorageSync(“kScreenW”)
},
iconPath: ‘image/image’,
clickable: true,
}
<map id=“myMap” bindmarkertap=“markertap” controls="{{controls}}" bindcontroltap=“controltap” > </map>
controltap: function (e) {
console.log(e)
var that = this
var id = e.controlId
if (id == 10) {
//页面跳转
url:页面跳转
}
}