How can I create multiple markers with different content when using infobox plugin http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/examples/infobox-ba
For infobox toggle onclick replace :
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
newMarkers[i].infobox.open(theMap, this);
theMap.panTo(markerData[i].latLng);
}
})(marker, i));
By :
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
for ( h = 0; h < newMarkers.length; h++ ) {
newMarkers[h].infobox.close();
}
newMarkers[i].infobox.open(theMap, this);
theMap.panTo(markerData[i].latLng);
}
})(marker, i));