> I get an error when I close the info window on my map because the
> latlng object is null as I clicked on the X, not directly on the map.

The infowindow is an overlay, like a GMarker or GPolygon, and
generates the same click events when a listener is attached to the
map.

When processing a map click, the usual action is to test the arguments
returned ; if it was a bare map click, you get a lat/long in arg2, if
it was an overlay, you get the overlay in arg1 and a lat/lng in
arg3.
http://code.google.com/apis/maps/documentation/events.html#Event_Arguments
http://code.google.com/apis/maps/documentation/reference.html#GMap2.click

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