var map1; var bounds1; var businesses1; var geocodes1; var cntGeocoded1 = 0; var directionsPanel1; var directions1; var focusedBusiness1; function generateMap1() { if (GBrowserIsCompatible() && document.getElementById("svmap_canvas1") != null) { geocoder1 = new GClientGeocoder(); geocoder1.setCache(null); var mapOptions = { mapTypes:[G_NORMAL_MAP] }; map1 = new GMap2(document.getElementById("svmap_canvas1"), mapOptions); var mapControl = new GMapTypeControl(); map1.addControl(mapControl); map1.addControl(new GLargeMapControl()); map1.disableDoubleClickZoom(); map1.disableScrollWheelZoom(); bounds1 = new GLatLngBounds; map1.setCenter(new GLatLng(43.8522623255626,4.772658348083496), 13); var marker3 = new GIcon(); marker3.image = "http://www.graveson-provence.fr/components/com_svmap/markers/blue.png"; marker3.iconSize = new GSize(12,20); marker3.iconAnchor = new GPoint(6,20); marker3.infoWindowAnchor = new GPoint(6,10); var marker20 = new GIcon(); marker20.image = "http://www.graveson-provence.fr/components/com_svmap/markers/letter-g.png"; marker20.iconSize = new GSize(20,34); marker20.iconAnchor = new GPoint(10,34); marker20.infoWindowAnchor = new GPoint(10,17); businesses1 = [[1,marker3,"Office de Tourisme",43.850923831960515,4.772272109985352,'
Cours national
Graveson
04 90 95 88 44
',"/en/component/svmap/business/office-de-tourisme/1.html","France Graveson 13690 Cours national"]]; addBusinesses1(); } } function setBounds1(bounds) { map1.setZoom(map1.getBoundsZoomLevel(bounds)); map1.setCenter(bounds.getCenter()); } function geocodeBusinesses1() { if (cntGeocoded1 < geocodes1.length) { geocoder1.getLocations(geocodes1[cntGeocoded1][7], addressResolved1); } } function addressResolved1(response) { var delay = 0; if (response.Status.code == 620) { delay = 500; } else { if (response.Status.code == 200) { var address = response.Placemark[0]; geocodes1[cntGeocoded1][3] = address.Point.coordinates[1]; geocodes1[cntGeocoded1][4] = address.Point.coordinates[0]; addBusiness(geocodes1[cntGeocoded1]); // Move onto the next address; this skips bad addresses, too. cntGeocoded += 1; } } window.setTimeout(geocodeBusinesses1, delay); } function addBusinesses1() { for (var i=0; i < businesses1.length; i++) { addBusiness1(businesses1[i]); } } function addBusiness1(business) { var point = new GLatLng(business[3], business[4]); var markerOptions = { icon:business[1], draggable: false, "title":business[2] }; var marker = new GMarker(point, markerOptions); var form = '