var latitude=0; var longitude=0; var map; function doLoad(with_map) { if (with_map) { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); map.addControl(new GSmallMapControl()); ov = new GOverviewMapControl(); map.addControl(ov); ovmap=ov.hide(); //map.addControl(new GOverviewMapControl()); map.addControl(new GMapTypeControl()); if (latitude == 0) { latitude = 46.0702; longitude = 11.1216; } GEvent.addListener(map, "click", function(marker, point) { if (window.doMapClick) { doMapClick(point); } }) map.setCenter(new GLatLng(latitude, longitude), 13); } } if (window.doLoad1) { doLoad1(); } } function addMapMarker(point, html, char) { var icon = new GIcon(); if (char==null){ icon.image = "http://www.giulianimmobiliare.it////images/marker.png"; icon.iconSize = new GSize(35, 18); } else { icon.image = "http://www.google.com/mapfiles/marker"+char+".png"; icon.iconSize = new GSize(20, 34); } icon.iconAnchor = new GPoint(6, 20); icon.infoWindowAnchor = new GPoint(5, 1); /* var center = new GLatLng(37.4419, -122.1419); map.setCenter(center, 13); var marker = new GMarker(center, {draggable: true}); GEvent.addListener(marker, "dragstart", function() { map.closeInfoWindow(); }); GEvent.addListener(marker, "dragend", function() { });*/ var marker = new GMarker(point, icon); //map.addOverlay(createMarker(point)); if (html != '') { GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); } map.addOverlay(marker); return marker; } function setAcquista() { document.getElementById("offer").selectedIndex=1; } function setAffitta() { document.getElementById("offer").selectedIndex=2; }