Thanks Rossko, that did the trick! Wasnt even that difficult, just 1
helper function that added the onclick.

On Nov 23, 2:10 pm, Rossko <[email protected]> wrote:
> > 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?
>
> Seehttp://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 examplehttp://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