Hi All,

I would like to register an event listener for "Click event" on a
Traffic Incident. Is this possible? How can this be achieved?

I am trying thing like the below, but it does not work.

function initialize() {
  map = new GMap2(document.getElementById("map_canvas"));
  map.setCenter(new GLatLng(49.496675,-102.65625), 3);
  var trafficOptions = {incidents:true};
  trafficInfo = new GTrafficOverlay(trafficOptions);
  map.addControl(new GLargeMapControl());
  map.addOverlay(trafficInfo);
  GEvent.addListener(trafficInfo, "click", function() {
  alert("You clicked the map.");
  });
}

--
Regards,
Libin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to