On Jan 3, 8:41 pm, mooney <[email protected]> wrote: > i want to add an infowindow to individual markers. i've tried doing: > > GEvent.addListener(marker, 'click', function() { > marker.openInfoWindowHtml(html); > }); > > this works with map.addOverlay but does not seem to work with > clusterer.js and google map api. > > here is my test link: > > http://www.bigeasylifeinsurance.com/m/prospects.php > > i'm using the example from > > http://google-maps-utility-library-v3.googlecode.com/svn/trunk/marker... > > any help would be great!
what is GMarker.initialize()? I don;t see it listed in the documentation: http://code.google.com/intl/it-IT/apis/maps/documentation/javascript/v2/reference.html#GMarker.GMarker function myclick(i) { gmarkers[i].initialize(map); GEvent.trigger(gmarkers[i], "click"); } The issue with using a click listener on a marker that is being managed by the clusterer is that it may not be added to the map yet. If it isn't added to the map (visible), it is missing pieces needed to open an infowindow on it. The easiest solution is to use GMap2.openInfoWindowHtml rather than GMarker.openInfoWIndowHtml. (this has come up many times before, I would think a search would give you some examples...) -- Larry -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
