
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>Mapa AlicanteComercio</title>
		<link rel="stylesheet" type="text/css" media="all" href="css/comercio2010.css" />
		<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAMWW2UYhjpqnhqjjhVL6naBQGDasHsCtMkZyYBaPOaI6jRIgdLRSlUuwnnFJKbLGbiOV8UWG0fC7MTw&hl=es"></script>
	</head>
	
	<body>
						<div>
					<div id="map" style="height:415px;"></div>
<script language="javascript" type="text/javascript">
	var map=null;
	var point_com =  new Array();
	var icon_com = new Array();
	var tipo_com = new Array();
	var html_com = new Array();
	var mimarker_com = new Array();
	var max_com = 0;

	var point_hit =  new Array();
	var icon_hit = new Array();
	var html_hit = new Array();
	var mimarker_hit = new Array();
	var max_hit = 0;

		
	function cargar_comercios() {
		cont = 0;

		max_com = cont-1;
		// alert("max_com:"+max_com);
	}

	function cargar_hitos() {
		cont = 0;

		point_hit[cont] =  new GLatLng(38.5373306274,-0.1160819978);
		icon_hit[cont] = new GIcon();
		
		icon_hit[cont].image = "http://www.comercioalicante.com/img/map16.png";
		icon_hit[cont].shadow = "http://www.comercioalicante.com/img/shadow50.png";
		
		icon_hit[cont].iconAnchor = new GPoint(9, 34);
		icon_hit[cont].infoWindowAnchor = new GPoint(9, 2);
		icon_hit[cont].infoShadowAnchor = new GPoint(18, 25);
		
		html_hit[cont] = '<b class="nombre"> CALLE GERONA</b><br/><br/>Telf: (+34) <br><a class="nombre" href="_calle_gerona.html">más información</a>';

		mimarker_hit[cont] = createMarker(point_hit[cont], icon_hit[cont], html_hit[cont]);
		cont++;
		
		point_hit[cont] =  new GLatLng(38.3436012268,-0.4825370014);
		icon_hit[cont] = new GIcon();
		
		icon_hit[cont].image = "http://www.comercioalicante.com/img/map16.png";
		icon_hit[cont].shadow = "http://www.comercioalicante.com/img/shadow50.png";
		
		icon_hit[cont].iconAnchor = new GPoint(9, 34);
		icon_hit[cont].infoWindowAnchor = new GPoint(9, 2);
		icon_hit[cont].infoShadowAnchor = new GPoint(18, 25);
		
		html_hit[cont] = '<b class="nombre">CASA CARBONELL</b><br/>PASEO DE LA EXPLANADA 8<br/>Telf: (+34) <br><a class="nombre" href="casa_carbonell.html">más información</a>';

		mimarker_hit[cont] = createMarker(point_hit[cont], icon_hit[cont], html_hit[cont]);
		cont++;
		
		point_hit[cont] =  new GLatLng(38.3484535217,-0.4793399870);
		icon_hit[cont] = new GIcon();
		
		icon_hit[cont].image = "http://www.comercioalicante.com/img/map16.png";
		icon_hit[cont].shadow = "http://www.comercioalicante.com/img/shadow50.png";
		
		icon_hit[cont].iconAnchor = new GPoint(9, 34);
		icon_hit[cont].infoWindowAnchor = new GPoint(9, 2);
		icon_hit[cont].infoShadowAnchor = new GPoint(18, 25);
		
		html_hit[cont] = '<b class="nombre">CASTILLO DE SANTA BARBARA</b><br/>CASTILLO DE SANTA BÁRBARA 1<br/>Telf: (+34) 965162128<br><a class="nombre" href="castillo_de_santa_barbara.html">más información</a>';

		mimarker_hit[cont] = createMarker(point_hit[cont], icon_hit[cont], html_hit[cont]);
		cont++;
		
		point_hit[cont] =  new GLatLng(38.3436737061,-0.4814659953);
		icon_hit[cont] = new GIcon();
		
		icon_hit[cont].image = "http://www.comercioalicante.com/img/map16.png";
		icon_hit[cont].shadow = "http://www.comercioalicante.com/img/shadow50.png";
		
		icon_hit[cont].iconAnchor = new GPoint(9, 34);
		icon_hit[cont].infoWindowAnchor = new GPoint(9, 2);
		icon_hit[cont].infoShadowAnchor = new GPoint(18, 25);
		
		html_hit[cont] = '<b class="nombre">EXPLANADA DE ESPAÑA</b><br/>PASEO DE LA EXPLANADA<br/>Telf: (+34) <br><a class="nombre" href="explanada_de_espana.html">más información</a>';

		mimarker_hit[cont] = createMarker(point_hit[cont], icon_hit[cont], html_hit[cont]);
		cont++;
		
		point_hit[cont] =  new GLatLng(38.3459014893,-0.4816530049);
		icon_hit[cont] = new GIcon();
		
		icon_hit[cont].image = "http://www.comercioalicante.com/img/map16.png";
		icon_hit[cont].shadow = "http://www.comercioalicante.com/img/shadow50.png";
		
		icon_hit[cont].iconAnchor = new GPoint(9, 34);
		icon_hit[cont].infoWindowAnchor = new GPoint(9, 2);
		icon_hit[cont].infoShadowAnchor = new GPoint(18, 25);
		
		html_hit[cont] = '<b class="nombre">MUSEO DE LOS BELENES</b><br/>Calle San Agustín 3<br/>Telf: (+34) 965202232<br><a class="nombre" href="museo_de_los_belenes.html">más información</a>';

		mimarker_hit[cont] = createMarker(point_hit[cont], icon_hit[cont], html_hit[cont]);
		cont++;
		
		point_hit[cont] =  new GLatLng(38.3456153870,-0.4791789949);
		icon_hit[cont] = new GIcon();
		
		icon_hit[cont].image = "http://www.comercioalicante.com/img/map16.png";
		icon_hit[cont].shadow = "http://www.comercioalicante.com/img/shadow50.png";
		
		icon_hit[cont].iconAnchor = new GPoint(9, 34);
		icon_hit[cont].infoWindowAnchor = new GPoint(9, 2);
		icon_hit[cont].infoShadowAnchor = new GPoint(18, 25);
		
		html_hit[cont] = '<b class="nombre">MUSEO GRAVINA</b><br/>Calle de Gravina 13-15<br/>Telf: (+34) 965146780<br><a class="nombre" href="museo_gravina.html">más información</a>';

		mimarker_hit[cont] = createMarker(point_hit[cont], icon_hit[cont], html_hit[cont]);
		cont++;
		
		point_hit[cont] =  new GLatLng(38.3484497070,-0.4793390036);
		icon_hit[cont] = new GIcon();
		
		icon_hit[cont].image = "http://www.comercioalicante.com/img/map16.png";
		icon_hit[cont].shadow = "http://www.comercioalicante.com/img/shadow50.png";
		
		icon_hit[cont].iconAnchor = new GPoint(9, 34);
		icon_hit[cont].infoWindowAnchor = new GPoint(9, 2);
		icon_hit[cont].infoShadowAnchor = new GPoint(18, 25);
		
		html_hit[cont] = '<b class="nombre">PARQUE DE LA ERETA</b><br/>PARQUE DE LA ERETA<br/>Telf: (+34) 965 14 32 90<br><a class="nombre" href="parque_de_la_ereta.html">más información</a>';

		mimarker_hit[cont] = createMarker(point_hit[cont], icon_hit[cont], html_hit[cont]);
		cont++;
		
		point_hit[cont] =  new GLatLng(38.3429946899,-0.4873239994);
		icon_hit[cont] = new GIcon();
		
		icon_hit[cont].image = "http://www.comercioalicante.com/img/map16.png";
		icon_hit[cont].shadow = "http://www.comercioalicante.com/img/shadow50.png";
		
		icon_hit[cont].iconAnchor = new GPoint(9, 34);
		icon_hit[cont].infoWindowAnchor = new GPoint(9, 2);
		icon_hit[cont].infoShadowAnchor = new GPoint(18, 25);
		
		html_hit[cont] = '<b class="nombre">PLAZA BALMIS</b><br/>PLAZA DEL DOCTOR BALMIS<br/>Telf: (+34) <br><a class="nombre" href="plaza_balmis.html">más información</a>';

		mimarker_hit[cont] = createMarker(point_hit[cont], icon_hit[cont], html_hit[cont]);
		cont++;
		
		point_hit[cont] =  new GLatLng(38.3444633484,-0.4882889986);
		icon_hit[cont] = new GIcon();
		
		icon_hit[cont].image = "http://www.comercioalicante.com/img/map16.png";
		icon_hit[cont].shadow = "http://www.comercioalicante.com/img/shadow50.png";
		
		icon_hit[cont].iconAnchor = new GPoint(9, 34);
		icon_hit[cont].infoWindowAnchor = new GPoint(9, 2);
		icon_hit[cont].infoShadowAnchor = new GPoint(18, 25);
		
		html_hit[cont] = '<b class="nombre">PLAZA DE LA MONTAÑETA</b><br/>PLAZA DE LA MONTAÑETA<br/>Telf: (+34) <br><a class="nombre" href="plaza_de_la_montaneta.html">más información</a>';

		mimarker_hit[cont] = createMarker(point_hit[cont], icon_hit[cont], html_hit[cont]);
		cont++;
		
		point_hit[cont] =  new GLatLng(38.3435173035,-0.4846810102);
		icon_hit[cont] = new GIcon();
		
		icon_hit[cont].image = "http://www.comercioalicante.com/img/map16.png";
		icon_hit[cont].shadow = "http://www.comercioalicante.com/img/shadow50.png";
		
		icon_hit[cont].iconAnchor = new GPoint(9, 34);
		icon_hit[cont].infoWindowAnchor = new GPoint(9, 2);
		icon_hit[cont].infoShadowAnchor = new GPoint(18, 25);
		
		html_hit[cont] = '<b class="nombre">PLAZA GABRIEL MIRO</b><br/>PLAZA DE GABRIEL MIRÓ<br/>Telf: (+34) <br><a class="nombre" href="plaza_gabriel_miro.html">más información</a>';

		mimarker_hit[cont] = createMarker(point_hit[cont], icon_hit[cont], html_hit[cont]);
		cont++;
		
		point_hit[cont] =  new GLatLng(38.3453636169,-0.4864580035);
		icon_hit[cont] = new GIcon();
		
		icon_hit[cont].image = "http://www.comercioalicante.com/img/map16.png";
		icon_hit[cont].shadow = "http://www.comercioalicante.com/img/shadow50.png";
		
		icon_hit[cont].iconAnchor = new GPoint(9, 34);
		icon_hit[cont].infoWindowAnchor = new GPoint(9, 2);
		icon_hit[cont].infoShadowAnchor = new GPoint(18, 25);
		
		html_hit[cont] = '<b class="nombre">PLAZA NUEVA</b><br/>PLAZA NUEVA<br/>Telf: (+34) <br><a class="nombre" href="plaza_nueva.html">más información</a>';

		mimarker_hit[cont] = createMarker(point_hit[cont], icon_hit[cont], html_hit[cont]);
		cont++;
		
		max_hit = cont-1;
		// alert("max_hit:"+max_hit);
		
	}
	function cargar_tipo(tipo, opc) {
		//alert("t:"+tipo+"-o:"+opc);
		if(opc==1) {
			map.clearOverlays();
			cargar_polyline();
		}
		if(tipo!=16) {
			for(cont=0; cont<=max_com; cont++) {
				if(tipo_com[cont]==tipo) {
					map.addOverlay(mimarker_com[cont]);
				}
			}
			if(max_com!=0) {
				$("#lista").load("ajax_listado.asp", "Itinerario=4&CodGen="+tipo);
			}
		}
		else {
			for(cont=0; cont<=max_hit; cont++) {
				map.addOverlay(mimarker_hit[cont]);
			}
			if(max_hit!=0) {
				$("#lista").load("ajax_listadoh.asp", "Itinerario=4");
			}
		}
	}
	function cargar_todo() {
		map.clearOverlays();
		cargar_polyline();
		for(cant=1;cant<=16;cant++) {
			cargar_tipo(cant, 0);
		}
	}
	function cargar_polyline() {
		var encodedPoints = "c_aiFpr|AbAmFcBoGiErBnB~Hr@zCtBzHlDuCx@oBl@wDp@fF}DlFeB@";
		var encodedLevels = "BBBBBBBBBBBBB";

		var encodedPolyline1 = new GPolyline.fromEncoded({
			color: "#E10000",
			weight: 7,
			points: encodedPoints,
			levels: encodedLevels,
			zoomFactor: 32,
			numLevels: 4
		});
		map.addOverlay(encodedPolyline1);

		var encodedPoints = "w``iFnh~AmCr@Oo@eAV{B{JaCl@x@rD`EkAw@wDlEqArAdHnAIrBtAfEuFqBwGyAr@a@iBtAy@gHkUy@a@u@^sAyDeAz@f@lB}BxADtB";
		var encodedLevels = "BBBBBBBBBBBBBBBBBBBBBBBBBB";

		var encodedPolyline2 = new GPolyline.fromEncoded({
			color: "#E10000",
			weight: 7,
			points: encodedPoints,
			levels: encodedLevels,
			zoomFactor: 32,
			numLevels: 4
		});
		map.addOverlay(encodedPolyline2);
	}

	function ini() {
		map = new GMap2(document.getElementById("map"));
		
		if(map != null) {
			var center = new GLatLng(38.34535865432956,-0.4802227020263672);
			map.addControl(new GSmallMapControl());
			
			map.addControl(new GMapTypeControl());		
			
			map.setCenter(center, 15);
			map.setMapType(G_HYBRID_MAP); //G_PHYSICAL_MAP - G_SATELLITE_MAP
			map.enableScrollWheelZoom();		

			cargar_polyline();
			cargar_comercios();
			cargar_hitos();
		}
	}
	function createMarker(point, icon, popuphtml) {
		var popuphtml = "<div>" + popuphtml + "<\/div>";			
		var marker = new GMarker(point, icon);
		GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowHtml(popuphtml);
		});
		return marker;
	}
	
	
</script>					
				</div>

		<script language="javascript" type="text/javascript">
			ini();
			
			cargar_tipo(tipo_com[0], 0);
			
		</script>
	</body>
</html>
