function load(){ if(GBrowserIsCompatible()){ var map = new GMap2(document.getElementById("mappa")); var mapTypeControl = new GSmallMapControl(); var topRight = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(10,10)); var bottomRight = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(10,20)); map.addControl(mapTypeControl, bottomRight); GEvent.addListener(map, "dblclick", function() { map.removeControl(mapTypeControl); map.addControl(new GSmallMapControl(), bottomRight); }); map.addControl(new GMapTypeControl(1)); map.setCenter(new GLatLng( 43.082555,10.540253), 10); map.setMapType(G_PHYSICAL_MAP); map.enableContinuousZoom(); map.enableDoubleClickZoom(); icon = new GIcon(); icon.image = "/immagini/rosso.png"; icon.iconSize = new GSize(44, 39); icon.iconAnchor = new GPoint(18, 40); icon.infoWindowAnchor = new GPoint(5, 1); iconb = new GIcon(); iconb.image = "/immagini/verde.png"; iconb.iconSize = new GSize(63, 56); iconb.iconAnchor = new GPoint(18, 50); iconb.infoWindowAnchor = new GPoint(5, 1); function createMarker(point, icon, notes){ var marker = new GMarker(point, icon); GEvent.addListener(marker, "click", function(){ marker.openInfoWindowHtml(notes); }); return marker; } GEvent.addListener(map, "moveend", function() { var center = map.getCenter(); }); GEvent.addListener(map, "zoomend", function() { var zoom = map.getZoom(); }); GEvent.addListener(map, "maptypechanged", function() { var mode = map.getCurrentMapType().getName(); }); var bounds = map.getBounds(); var southWest = bounds.getSouthWest(); var northEast = bounds.getNorthEast(); var lngSpan = northEast.lng() - southWest.lng(); var latSpan = northEast.lat() - southWest.lat(); var point=new GLatLng(43.082555,10.540253); map.addOverlay(createMarker(point, iconb, '
Il Cardellino
')); var point=new GLatLng(43.08042388708439,10.540008544921875); map.addOverlay(createMarker(point, icon, '
Bike Tour San Vincenzo Casale-M.mo-Castagneto Carducci
Bike Tour San Vincenzo Casale-M.mo-Castagneto Carducci
')); var geoXml25; geoXml25 = new GGeoXml("http://residencecardellino.com/kml/escursione_anello_san_vincenzo_-_castagneto_carducci_-_casale_m.mo.kml"); //GEvent.addListener(geoXml25, 'click', function() { // When clicked, open an Info Window // geoXml25.openInfoWindowHtml('Some text'); // }); map.addOverlay(geoXml25); }}//]]>