Salve!
utilizzando queste funzioncine, carico dei markers su una mappa google con gli indirizzi presi da db. Il problema è che viene visualizzato solamente l' InfoWindowHtml dell'ultimo indirizzo caricato, mentre io vorrei vederli tutti!
Se volete provare, andate qui
e entrate con queste credenziali
user: casa
password: user_217
Grazie per l'attenzione e buona giornata!codice:function load() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(41.91633, 12.482185), 5); geocoder = new GClientGeocoder(); } } function showAddress(address) { if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { alert(address + " not found"); } else { map.setCenter(point, 12); /*var marker = new google.maps.Marker({ position: point, map: map, title:adress });*/ var marker = new GMarker(point); map.addOverlay(marker); marker.openInfoWindowHtml(address); GEvent.addListener(marker, "click", function() { marker<?=$contatore;?> .openInfoWindowHtml(address); }); } } ); } }

Rispondi quotando