deleteOverlays(); clearKmls(contourCom); bounds = new google.maps.LatLngBounds(); var markerLatLng = new google.maps.LatLng(parseFloat(43.1049995422363),parseFloat(3.08861994743347)); var image = 'IMG/rubon4.png?1455706044'; var icone = new google.maps.MarkerImage(image, new google.maps.Size(25, 25), new google.maps.Point(0,0), new google.maps.Point(12.5, 12.5) ); marker_97 = new google.maps.Marker({ position: markerLatLng, map: map, icon: icone, title: '' }); markersArray.push(marker_97); google.maps.event.addListener(marker_97, 'click', function() { $.ajax({ type: "GET", url: 'spip.php?page=ajax-infobulle', data: 'id_article=97', success:function(responseText){ contenu_html = responseText; }, complete:function(){ if(openInfo) openInfo.close(); var infowindow_97 = new google.maps.InfoWindow({ content: contenu_html }); openInfo = infowindow_97; infowindow_97.open(map,marker_97); } }); }); bounds.extend(markerLatLng); showKmls(contourCom['com_97']); var markerLatLng = new google.maps.LatLng(parseFloat(43.1077995300293),parseFloat(3.08892011642456)); var image = 'IMG/rubon4.png?1455706044'; var icone = new google.maps.MarkerImage(image, new google.maps.Size(25, 25), new google.maps.Point(0,0), new google.maps.Point(12.5, 12.5) ); marker_101 = new google.maps.Marker({ position: markerLatLng, map: map, icon: icone, title: '' }); markersArray.push(marker_101); google.maps.event.addListener(marker_101, 'click', function() { $.ajax({ type: "GET", url: 'spip.php?page=ajax-infobulle', data: 'id_article=101', success:function(responseText){ contenu_html = responseText; }, complete:function(){ if(openInfo) openInfo.close(); var infowindow_101 = new google.maps.InfoWindow({ content: contenu_html }); openInfo = infowindow_101; infowindow_101.open(map,marker_101); } }); }); bounds.extend(markerLatLng); showKmls(contourCom['com_101']); showOverlays(); map.fitBounds(bounds);