// GOOGLE MAP if(Object.isUndefined(InfoBulle)) var InfoBulle=0; if(Object.isUndefined(ZoomGGMap)) var ZoomGGMap=12; if(Object.isUndefined(MarkerTitle)) var MarkerTitle=""; if(Object.isUndefined(MarkerInner)) var MarkerInner=""; if(Object.isUndefined(VilleGGMap)) var VilleGGMap="Montpellier, France"; Event.observe(window, 'load', InitialiserMap, false); Event.observe(window, 'unload', GUnload, false); var geocoder = null; function InitialiserMap() { if (GBrowserIsCompatible()) { var map = new GMap2($("map")); map.setCenter(new GLatLng(0.7609635540, 0.0677769470), ZoomGGMap); map.addControl(new GSmallZoomControl()); geocoder = new GClientGeocoder(); } if (geocoder) { geocoder.getLatLng( VilleGGMap, function(point) { if (point) { map.setCenter(point, ZoomGGMap); if(InfoBulle) createMarker(point, map,MarkerTitle,MarkerInner, 0,""); } } ); } } // Creation de l'info bulle function createMarker(P, M, title, html, n, tooltip) { var counter = 0; var icon = []; icon[0] = new GIcon(); icon[0].image = "http://maps.google.com/mapfiles/ms/micons/rangerstation.png"; icon[0].iconSize = new GSize(32,32); icon[0].iconAnchor = new GPoint(16,16); icon[0].infoWindowAnchor = new GPoint(16,16); if(n >= 1) { n = 0; } var marker = new GMarker(P,{'icon': icon[n], 'title': tooltip}); //GEvent.addListener(marker, "mouseover", function() { marker.openInfoWindowHtml(html); }); counter++; M.addOverlay(marker); }