Typical form of a general-purpose click listener ;

GEvent.addListener(map, "click", function(overlay, latlng,
clicklatlng) { .....

If a polygon is clicked, you get the overlay handle and a clicklatlng
object (latlng will be null).

If you've tagged your polygons somehow when creating them, you could
use the tag to look up whatever stuff you want to go in the
infowindow.   Then you can open an infowindow on the map, planted at
the clicklatlng.

Remember to have the listener do something sensible (nothing perhaps)
if the bare map is clicked, or a marker or zoom overlay is clicked,
etc.

An alternative approach is to set listeners on each individual poly.

cheers, Ross K

--~--~---------~--~----~------------~-------~--~----~
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