Hi,
I am having what seems to be a simple problem but one that I can't seem to
figure out. In this snippet of code, the info window does not display due
to being undefined. It is only within the addListener event block where it
is undefined but not elsewhere. Does anyone know why that would be the case?
contentArray is a global array that contains strings in each position
var markerCluster = new MarkerClusterer(map, markers,{gridSize: 20,
maxZoom:8, styles: styles[0]});
var infowindowarray = new Array();
for (var i = 0; i < markerArray.length; i++){
infowindowarray[i]= new google.maps.InfoWindow({
content: contentArray[i]});
google.maps.event.addListener(markerCluster, 'clusterclick',
function(cluster) {
if (map.getZoom() == 8) {
infowindowarray[i].open(map, cluster);
}//if max zoom
});
}//for loop
});
}
Thanks,
Greg
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-maps-js-api-v3/-/tDnVsLBFVqEJ.
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.