这里是视图map组件
<map class=‘map’ id=“map” longitude="{{longitude}}" latitude="{{latitude}}" scale=“14” show-location controls="{{controls}}" bindcontroltap=“controltap”></map>
这里是controls的对象数组
controls: [
{
id: 2,
iconPath: ‘/img/ios.png’,
position: {
left: app.globalData.windowWidth / 2 - 12.5,
top: (app.globalData.windowHeight - 40) / 2 - 12.5,
width: 25,
height: 25
},
clickable: true
},
{
id: 1,
iconPath: ‘/img/ios-active.png’,
position: {
left: 8,
top: (app.globalData.windowHeight - 40) - 25 - 8,
width: 25,
height: 25
},
clickable: true
}
]
这里是bindcontroltap所绑定的事件函数
controltap: function (e) {
console.log(e)
}
但是该函数不会触发??????????