var initialize = function() { var latlng = new google.maps.LatLng(44.100479,10.756407); // imposta le opzioni di visualizzazione var options = { zoom: 10, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; // crea l'oggetto mappadove var map = new google.maps.Map(document.getElementById('mappadove'), options); jQuery(document).ready(function(){ geoXml = new geoXML3.parser({ map: map, singleInfoWindow: true, // zoom: false, afterParse: useTheData }); geoXml.parse('/kml/tracciato1_.kml'); }); function useTheData(doc){ var myLatLngD = new google.maps.LatLng(44.100479, 10.756407); var marker = new google.maps.Marker( { position: myLatLngD, map: map, icon: '/immagini/giallo.png', flat: true } ); var tooltip = '
Sfida a Cutigliano
'; var infowindow = new google.maps.InfoWindow({ content: tooltip }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); }; var iconb = "/immagini/verde.png"; var myLatLng = new google.maps.LatLng(44.09920495231826,10.757975578308105); var contentString = 'Hotel Villa Patrizia'; var infowindows = new google.maps.InfoWindow({content: contentString, maxWidth: 100}); var beachMarker = new google.maps.Marker({position: myLatLng, map: map, icon: iconb, title: 'Hotel Villa Patrizia'}); google.maps.event.addListener(beachMarker, 'click', function() {infowindows.open(map,beachMarker);}); } window.onload = initialize;