Hi, I'm having an issue with listeners on Google Maps.
Code:
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));
});
There seems to be an issue with the listener as it is not hitting the console.log('touched marker');.
I've tried changing the listener to trafficMap to see if that responds but it does not. I have tried, click, mousedown, mouseup etc.
Thanks.