Joomla.it Forum
Joomla! 1.0.x (versione con supporto terminato) => Le voci di Joomla.it (solo per versione Joomla 1.0.x) => : fursabo 15 Nov 2007, 16:16:11
-
Ciao a tutti,
Scusatemi ma sono proprio agli inizi con google map. Vorrei mettere più di un marker su una mappa (ora riesco a metterne solo uno) ed associarli un link ad un'altra pagina web esterna.
Qualcuno potrebbe aiutarmi.
Grazie!!
Ciao
-
Con cosa lavori con il componente con il plugin?
Con il componente è possibile mettere più di un marker con in plugin no.
Comunque c'e già una una discussione aperta in cui potrai trovare tante informazioni.
Eccola qui (http://forum.joomla.it/index.php/topic,26213.0.html).
Saluti Vales
-
Cercando un po in rete sono riusciuto a trovare un'esempio (l'ho copiato alla fine del messaggio)che va bene per il lavoretto che dovrei fare.
Avrei un'altra domanda , sarebbe possibile cambiare l'immagine associata ai marker?
Grazie ancora!!
Ciao
<script type="text/javascript">
if (GBrowserIsCompatible()) {
function createMarker(point,html) {
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
return marker;
}
var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(45.861684,9.366875),12);
var point = new GLatLng(45.861654,9.379011);
var marker = createMarker(point,'<div style="width:240px">Some stuff to display in the First Info Window. With a Link (http://www.llll) to my home page</div>')
map.addOverlay(marker);
var point = new GLatLng(45.851512,9.368921);
var marker = createMarker(point,'Some stuff to display in the
Second Info Window')
map.addOverlay(marker);
var point = new GLatLng(45.841689,9.3511001);
var marker = createMarker(point,'Some stuff to display in the
Third Info Window')
map.addOverlay(marker);
}
else {
alert("Sorry, the Google Maps API is not compatible with this browser");
}
</script>