﻿var icon_image = 'images/icono_gcs_sinletras.png';
	var icon_shadow = 'images/sombra_icono_gcs.png';
  
  function initialize() {
    
	//var latlng = new google.maps.LatLng(40.431204,-3.700933);

	var latlng = new google.maps.LatLng(40.446139,-3.705536);
	var latlng_cafe = new google.maps.LatLng(40.437777,-3.6891);
    var myOptions = {
      zoom: 13,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
   
    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
	   var marker_cafe = new MarkerWithLabel({
       position: latlng_cafe,
       map: map,
       draggable:false,
       labelContent: "A",
       labelAnchor: new google.maps.Point(5, 41),
       labelClass: "labels", // the CSS class for the label
       labelInBackground: false,
	   icon: icon_image,
	   shadow: icon_shadow
     });
	
	 var iw_cafe = new google.maps.InfoWindow({
       content: "<p class='color_black'>Cafe Saigon: Maria de Molina 4, Madrid</p>"
     });
     google.maps.event.addListener(marker_cafe, "click", function (e) { iw_cafe.open(map, marker_cafe);});
  

	var latlng_dragon=new google.maps.LatLng(40.422441,-3.689644);
	var marker_dragon = new MarkerWithLabel({
       position: latlng_dragon,
       map: map,
       draggable: false,
       labelContent: "B",
       labelAnchor: new google.maps.Point(5, 40),
       labelClass: "labels", // the CSS class for the label
       labelInBackground: false,
	   icon: icon_image,
	   shadow: icon_shadow
     });
   var iw_dragon = new google.maps.InfoWindow({
       content: "<p class='color_black'>Le Dragon: Gil de Santivañes, 2</p>"
     });
     google.maps.event.addListener(marker_dragon, "click", function (e) { iw_dragon.open(map, marker_dragon);});

	var latlng_petit=new google.maps.LatLng(40.461224,-3.691803);
	var marker_petit = new MarkerWithLabel({
       position: latlng_petit,
       map: map,
       draggable: false,
       labelContent: "D",
       labelAnchor: new google.maps.Point(5, 40),
       labelClass: "labels", // the CSS class for the label
       labelInBackground: false,
	   icon: icon_image,
	   shadow: icon_shadow
     });
	 var iw_petit = new google.maps.InfoWindow({
       content: "<p class='color_black'>Petit Saigon: Capitan Haya, 43</p>"
     });
     google.maps.event.addListener(marker_petit, "click", function (e) { iw_petit.open(map, marker_petit);});


	var latlng_tse=new google.maps.LatLng(40.429636,-3.688903);
	//var icon_image = "http://maps.google.com/mapfiles/ms/micons/red.png";
	   var marker_tse = new MarkerWithLabel({
       position: latlng_tse,
       map: map,
       draggable:false,
       labelContent: "C",
       labelAnchor: new google.maps.Point(5, 40),
       labelClass: "labels", // the CSS class for the label
       labelInBackground: false,
	   icon: icon_image,
	   shadow: icon_shadow
     });
	var iw_tse = new google.maps.InfoWindow({
       content: "<p class='color_black'>Tse Yang: Paseo Castellana, 22</p>"
     });
     google.maps.event.addListener(marker_tse, "click", function (e) { iw_tse.open(map, marker_tse);});

	var latlng_furama=new google.maps.LatLng(40.421242,-3.720859);
	 var marker_furama = new MarkerWithLabel({
       position: latlng_furama,
       map: map,
       draggable:false,
       labelContent: "E",
       labelAnchor: new google.maps.Point(5, 40),
       labelClass: "labels", // the CSS class for the label
       labelInBackground: false,
	   icon: icon_image,
	   shadow: icon_shadow
     });
		var iw_furama = new google.maps.InfoWindow({
       content: "<p class='color_black'>Furama: Paseo Florida, 2</p>"
     });
     google.maps.event.addListener(marker_furama, "click", function (e) { iw_furama.open(map, marker_furama);});
  }

function fnGoTo(lat, lng, letra, letrero)
{
	
	var latlng = new google.maps.LatLng(lat,lng);
	var latlng_cafe = new google.maps.LatLng(lat,lng);
    var myOptions = {
      zoom: 15,
      center: latlng_cafe,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
   
    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
	   var marker_cafe = new MarkerWithLabel({
       position: latlng_cafe,
       map: map,
       draggable:false,
       labelContent: letra,
       labelAnchor: new google.maps.Point(5, 41),
       labelClass: "labels", // the CSS class for the label
       labelInBackground: false,
	   icon: icon_image,
	   shadow: icon_shadow
     });
	
	 var iw_cafe = new google.maps.InfoWindow({
       content: letrero
     });
     google.maps.event.addListener(marker_cafe, "click", function (e) { iw_cafe.open(map, marker_cafe);});	
}

