/********************************
 *  	Google Maps API v3 	    *
 * 	   pour Concept2 France     *
 * 								*
 * carte:						*
 *   Stade Pierre de Coubertin	*
 *   Paris XVIe					*
 ********************************/

function initialize_coubertin() {
	var mapCenter = new google.maps.LatLng(48.83658133011344, 2.2552549839019775); // Centrage de la carte
// Options de la carte
	var myOptions = {
	  zoom: 16,
	  center: mapCenter,
	  scaleControl: true,
	  navigationControl: true,
	  navigationControlOptions: { style: google.maps.NavigationControlStyle.ZOOM_PAN },
	  mapTypeControl: false,
	  mapTypeId: google.maps.MapTypeId.HYBRID
	}
	var map = new google.maps.Map(document.getElementById("map_coubertin"),myOptions);
	
// Icones
	var c2_icon = 'http://www.open-concept2.fr/gmaps/icons/c2_icon.png';
	var bus_icon = 'http://www.open-concept2.fr/gmaps/icons/bus_icon.png';
	var metro_icon = 'http://www.open-concept2.fr/gmaps/icons/metro_icon.png';
	var velib_icon = 'http://www.open-concept2.fr/gmaps/icons/velib_icon.png';
	var parking_icon = 'http://www.open-concept2.fr/gmaps/icons/parking_icon.png';
	
// Marqueurs
	// Stade Pierre de Coubertin
	var stadeCoubertin = new google.maps.Marker({
		position: new google.maps.LatLng(48.835103623370514, 2.2563976049423218),
	    map: map,
	    icon: c2_icon
	});
	// Vélib
	var velib = new google.maps.Marker({
		position: new google.maps.LatLng(48.83756997456421, 2.25793719291687),
		map: map,
		icon: velib_icon,
		title: 'Station Vélib n°16042'
	});
	// Métro
	var metro1 = new google.maps.Marker({
		position: new google.maps.LatLng(48.837800361226684, 2.255740463733673),
	    map: map,
	    icon: metro_icon,
		title: 'Métro - ligne 9'
	});
	var metro2 = new google.maps.Marker({
		position: new google.maps.LatLng(48.83704740778555, 2.2566282749176025),
	    map: map,
	    icon: metro_icon,
		title: 'Métro - ligne 9'
	});
	// Bus
	var bus189 = new google.maps.Marker({
		position: new google.maps.LatLng(48.834761996791116, 2.2557592391967773),
	    map: map,
	    icon: bus_icon,
		title: 'Bus 189 - Pierre de Coubertin'
	});
	var busStCloud = new google.maps.Marker({
		position: new google.maps.LatLng(48.83775446052021, 2.2561052441596985),
		map: map,
		icon: bus_icon,
		title: 'Bus RATP - Porte de Saint-Cloud'
	});
	var bus289_peupliers = new google.maps.Marker({
		position: new google.maps.LatLng(48.83445567847154, 2.254815101623535),
		map: map,
		icon: bus_icon,
		title: 'Bus 289 - Les Peupliers'
	});
	var parkingPointduJour = new google.maps.Marker({
		position: new google.maps.LatLng(48.834383291736245, 2.255721688270569),
		map: map,
		icon: parking_icon,
		title: 'Parking "Point du Jour"'
	});
	var parkingParcdeSaintCloud = new google.maps.Marker({
		position: new google.maps.LatLng(48.83861244369389, 2.25369930267334),
		map: map,
		icon: parking_icon,
		title: 'Parking Porte de Saint-Cloud'
	});
// Fenêtres d'information
	var infoBox = new BFInfoWindow();
	var stadeCoubertin_info = '<strong class="GmapTitle">Stade Pierre de Coubertin</strong><div>82 avenue Georges Lafont<br />75016 PARIS</div>';
	google.maps.event.addListener(stadeCoubertin, 'click', function() {
  		infoBox.set_content(stadeCoubertin_info);
		infoBox.open(map,stadeCoubertin);
	});
	var busStCloud_info = '<strong class="GmapTitle">Porte de Saint-Cloud</strong><div>Bus RATP[22, 62, 189, 289, PC1]</div>';
	google.maps.event.addListener(busStCloud, 'click', function() {
  		infoBox.set_content(busStCloud_info);
		infoBox.open(map,busStCloud);
	});
	var bus189_info = '<strong class="GmapTitle">Pierre de Coubertin</strong><div>Bus RATP[189]</div>';
	google.maps.event.addListener(bus189, 'click', function() {
  		infoBox.set_content(bus189_info);
		infoBox.open(map,bus189);
	});
	var bus289_peupliers_info = '<strong class="GmapTitle">Les Peupliers</strong><div>Bus RATP[289]</div>';
	google.maps.event.addListener(bus289_peupliers, 'click', function() {
  		infoBox.set_content(bus289_peupliers_info);
		infoBox.open(map,bus289_peupliers);
	});
	var metro_info = '<strong class="GmapTitle">Porte de Saint-Cloud</strong><div>Métro - Ligne 9</div>';
	google.maps.event.addListener(metro1, 'click', function() {
  		infoBox.set_content(metro_info);
		infoBox.open(map,metro1);
	});
	google.maps.event.addListener(metro2, 'click', function() {
  		infoBox.set_content(metro_info);
		infoBox.open(map,metro2);
	});
	var velib_info = '<strong class="GmapTitle">Station Vélib n°16042</strong><div>120-122 boulevard Murat - 75016 PARIS<br />&rarr;56 points d\'attache au total<br />&rarr;<a href="http://www.velib.paris.fr/service/viewstation/16042" target="_blank">Plus d\'infos sur cette station...</a></div>';
	google.maps.event.addListener(velib, 'click', function() {
  		infoBox.set_content(velib_info);
		infoBox.open(map,velib);
	});
	var parkingPointduJour_info = '<strong class="GmapTitle">Parking "Point du Jour"</strong><div>accès avenue du Stade-de-Coubertin<br />ou Place Abel-Gance<br />&rarr;450 places disponibles</div>';
	google.maps.event.addListener(parkingPointduJour, 'click', function() {
  		infoBox.set_content(parkingPointduJour_info);
		infoBox.open(map,parkingPointduJour);
	});
	var parkingParcdeSaintCloud_info = '<strong class="GmapTitle">Parking "Porte de Saint-Cloud"</strong><div>2 avenue Porte de Saint-Cloud<br />75016 PARIS<br />accès par la station service</div>';
	google.maps.event.addListener(parkingParcdeSaintCloud, 'click', function() {
  		infoBox.set_content(parkingParcdeSaintCloud_info);
		infoBox.open(map,parkingParcdeSaintCloud);
	});
	
}