// JavaScript Document

// ============================================== INIT MAP ==============================================

function initialize(codeLanguage,myLat,myLng) {
	
  var stylez = [
  {
    stylers: [
      { saturation: -100 }
    ]
  },{
    featureType: "water",
    stylers: [
      { saturation: 60 }
    ]
  },{
    featureType: "transit.station.rail",
    stylers: [
      { hue: "#ff0091" },
      { saturation: 100 }
    ]
  }
];
	
	
	var myLatLng = new google.maps.LatLng(myLat, myLng);	
	  
	var myOptions = {
		  zoom: 14,
		  center: myLatLng,
		  mapTypeControl: false,
			zoomControl: true,
			zoomControlOptions: {
				style: google.maps.ZoomControlStyle.LARGE
			},
			streetViewControl: false,
		  mapTypeId: google.maps.MapTypeId.ROADMAP
	};
	var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
  
  var image = 'img/pointeur-mcube.png';
  var marker = new google.maps.Marker({
	  position: myLatLng, 
	  map: map,
	  icon: image
  });
  
  var contentString = '<div class="mapInfobulleBloc"><div class="mapInfobulleBlocTitre">Mcube, l\'Agence Web</div><p>2 rue des Mûriers<br />Villa Créatis<br />69009 LYON</p><p class="tel">+33 (0)4 37 64 69 84</p></div>';
	var infowindow = new google.maps.InfoWindow({
		content: contentString,
		pixelOffset: {width:10, height:45}
	});

	google.maps.event.addListener(marker, 'click', function() {
		infowindow.open(map,marker);
	});

  var styledMapOptions = {
      name: "mcube"
  }

  var jayzMapType = new google.maps.StyledMapType(stylez, styledMapOptions);

  map.mapTypes.set('mcube', jayzMapType);
  map.setMapTypeId('mcube');
	
}

// ============================================== INIT MAP ==============================================

