If you want to listen to *click* events within the InfoBox, you can probably add the listener to the HTML Node passed in as the content. Have you tried this?
To open InfoBox, it's probably best to maintain a single global variable for which you can call anywhere. This will also ensure only a single InfoBox is open at any moment. Regarding Markers, it's never a bad idea to maintain a global collection of any Overlay objects added onto the map. This includes Markers, Polygons, Polylines, Rectangle, Circle, etc. In terms of what to use as the key in a Dictionary collection, I think it depends on what meta data is present in your app, as long as it's unique. Hope this helps, Dann On Sun, Apr 4, 2010 at 7:27 AM, starenka <[email protected]> wrote: > Hi all! > > I've just fell down the rabbit hole into this map Wonderland. Don't > bash me for asking a trivial question. I'm trying to bind a click > event on infoBox (http://code.google.com/p/google-maps-utility-library- > v3/source/browse/trunk/infobox/src/infobox.js?spec=svn50&r=49<http://code.google.com/p/google-maps-utility-library-%0Av3/source/browse/trunk/infobox/src/infobox.js?spec=svn50&r=49>). > The > event just don't seem to work at all (see the alert thing). What's my > problem? I can't provide an URL but, the functions which spawn > markers and windows is +- like this http://openpaste.org/en/20310/ > > PS. I need to open the infoboxes later - on demand (not only after > marker click). How should i do that? Is storing references to markers/ > info boxes a good idea (f.e a dict with marker/boxes, where key is > hashed latlon)? How do you solve such things? > > Thanks for your time & help > > starenka > > -- > 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]<google-maps-js-api-v3%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > -- Daniel Lee Developer Programs Engineer Google, Inc. 345 Spear Street San Francisco, CA 94105 650 253 0967 -- 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.
