【发布时间】:2011-08-05 10:07:12
【问题描述】:
我在 Google 地图上遇到了听众问题。
var marker_icon = new google.maps.MarkerImage('images/map/' + thisIcon + '.png', new google.maps.Size(32, 32)); var trafficMarker = new google.maps.Marker({
position: new google.maps.LatLng(alert.lat, alert.lon),
map: trafficMap,
icon: marker_icon,
id: 'trafficAlertIcon' + i
});
console.log('Test Log3');
google.maps.Event.addListener(trafficMarker, 'mousedown', function()
{
console.log('touched marker');
trafficTabPanel.layout.setActiveItem(1, {type: 'slide', direction: 'left'});
LoadIncidentMap(this.id.substring(16));
});
监听器似乎有问题,因为它没有点击 console.log('touched marker');。
我尝试将侦听器更改为 trafficMap 以查看它是否响应,但它没有。我试过了,click,mousedown,mouseup等。
谢谢。
【问题讨论】:
标签: javascript google-maps sencha-touch