// JavaScript Document

function loadmaps(){
	if (GBrowserIsCompatible()){
		// Icones
		var baseIcon = new GIcon();
		baseIcon.iconSize=new GSize(32,32);
		baseIcon.shadowSize=new GSize(56,32);
		baseIcon.iconAnchor=new GPoint(16,32);
		baseIcon.infoWindowAnchor=new GPoint(16,0);
		
		var CIO = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal3/icon23.png", null, "http://maps.google.com/mapfiles/kml/pal3/icon23s.png");
		var depart   = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal4/icon62.png", null, "http://maps.google.com/mapfiles/kml/pal4/icon62s.png");
		var sommet = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal2/icon13.png", null, "http://maps.google.com/mapfiles/kml/pal2/icon13s.png");
		var wpt = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal5/icon14.png", null, "http://maps.google.com/mapfiles/kml/pal5/icon14s.png");
		
		// Fonction Marqueur
		function createMarker(point, txt, icon, nom){
			var marker = new GMarker(point, {icon: icon, title: nom});
			GEvent.addListener(marker, "click", function(){
				marker.openInfoWindowHtml(txt);
			});
			return marker;
		}
		
		// déclaration de la map
		var map = new GMap2(document.getElementById("map"));
		
		// Ajout des contrôles
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		
		// Centrage de la carte
		map.setCenter(new GLatLng(50.44722980684235,4.849863052368164),12);
		
		// Type Satellite
		map.setMapType(G_NORMAL_MAP); // Vue carte
		//map.setMapType(G_HYBRID_TYPE);
		
		// Tracé points caractéristiques
		var point = new GLatLng(50.44722980684235, 4.849863052368164); map.addOverlay(createMarker(point,"<strong>CIO - Club Wallonie-Bruxelles (lieu de réunion : <a href='http://www.cercledewallonie.be'>Cercle de Wallonie</a>)</strong>",CIO,"CIO"));
	}
}
