Salve,
ho letto un po di post ma non ho trovato la soluzione al mio problema.
Nel mio sito ho inserito una mappa tramite le mappe di Google con il codice inserito nell'head della pagina. Su questo non ho problemi, quando inserisco il marker non mi compare, ecco il codice che inserisco:
questo è nell'head..che problema c'è che non mi esce il marker sulla mappa?codice:<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAApmEp_of_BvHMtx-W....." type="text/javascript"></script> <script type="text/javascript"> //<![CDATA[ var map = null; var geocoder = null; function load() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); /*mappa - satellite - ibrida */ map.addControl(new GMapTypeControl()); /*controller con barra vert*/ map.addControl(new GLargeMapControl()); /*zoom box, in basso a dx*/ map.addControl(new GOverviewMapControl(), new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(9, 9))); /*COORDINATE DI PARTENZA DELLA MAPPA*/ map.setCenter(new GLatLng(41.839, 12.647), 15); geocoder = new GClientGeocoder(); } } // Crea un nuovo marker nel punto specificato // con una descrizione HTML associata function createMarker(point, description) { var marker = new GMarker(point); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(description); }); return marker; } // Aggiungi il marker alla mappa map.addOverlay(createMarker(new GLatLng(41.896655,12.495918), "Area Roma, Italia")); /*cerca un indirizzo*/ function showAddress(address) { if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { alert(address + " non trovato"); } else { /*zoom*/ map.setCenter(point, 14); var marker = new GMarker(point); map.addOverlay(marker); marker.openInfoWindowHtml(address); } } ); } } //]]> </script> </head>
grazie.

Rispondi quotando