- Home
- Categorie
- La Community Connect.gt
- News Ufficiali da Connect.gt
- google maps, aggiungere un marker
-
google maps, aggiungere un marker
Ciao a tutti,
dovrei usare google maps e in pratica impostare il tutto in modo che se clicco sulla mappa si aggiunge un nuovo marker, io ho fatto cosi:>
var map = null;
var marker = null;
function load()
{
if (GBrowserIsCompatible())
{
map = new GMap2(document.getElementById("mappa"));
map.setCenter(new GLatLng(41.451,2.203), 8);function creamarker(point) { marker = new GMarker(point); map.addOverlay(marker); return marker; }
}
}ora dopo questo dovrei aggiunngere l'evento listening sulla mappa ma e qua che mi sono impantanato.
qualcuno mi spiega come fare?
Gracias.