On 26 April 2011 19:42, Dan <[email protected]> wrote: > Howdy all, I'm pretty new at the v3 api, and javascript in general, > and have been going batty trying to figure out how to display an info > window on clusterclick to show information from the markers it > contains. Ive been digging through the threads and managed to get an > alert to populate with the array (?) length/etc, but am having real > trouble moving forward with displaying any information from within > that array, I keep getting [object Object]. any help would be > appreciated.. test site link is here: > http://smartersummerssite.org/map/index.php
This line alert (size + center + clickedMarkers); outputs size (3), center (coordinates) and clickedMarkers, which is an array of Marker objects. When you output an array like that, Javascript does its best to enumerate the array, so you get three Objects. However, each marker within that array is accessible: eg. clickedMarkers[0].title is "test". So you need to do something with the array of markers. You could construct and display an infoBubble with the titles, for example. There may be a problem here: markers.push(marker), bindInfoBubble(marker, map, infoBubble,html); Did you mean to put a comma between two statements? Should that be a semicolon? In this instance it may not make much difference, but when a comma is used as an operator like this it has a particular meaning. -- 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.
