> alert(map[i].id); doesnt work...

No, what would the value of 'i' be when the code is actually run?

>  how do I capture the id in the function closure?

See
http://econym.org.uk/gmap/closure.htm
and other javascript tutorials, its not an easy concept.
Generally you take out the defining of the listener to another helper
function, to which you pass the value of 'i' or whatever you are
trying to capture.
An infowindow example
http://econym.org.uk/gmap/basic1.htm

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to