
<!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;

		point_com[cont] =  new GLatLng(38.362746,-0.430924);
		icon_com[cont] = new GIcon();
		
		icon_com[cont].image = "http://www.comercioalicante.com/img/map5.png";
		icon_com[cont].shadow = "http://www.comercioalicante.com/img/shadow50.png";
		
		icon_com[cont].iconAnchor = new GPoint(9, 34);
		icon_com[cont].infoWindowAnchor = new GPoint(9, 2);
		icon_com[cont].infoShadowAnchor = new GPoint(18, 25);
		
		html_com[cont] = '<b class="nombre">FERRETERÍA BRICOLAGE EL CABO</b><br/>CALLE DEPORTISTA KIKO SÁNCHEZ                                 <br/>Telf: (+34) 965162299<br><a class="nombre" href="ferreteria_bricolage_el_cabo.html">más información</a>';
		tipo_com[cont] = 5;
		mimarker_com[cont] = createMarker(point_com[cont], icon_com[cont], html_com[cont]);
		cont++;
		
		max_com = cont-1;
		// alert("max_com:"+max_com);
	}

	function cargar_hitos() {
		cont = 0;

		point_hit[cont] =  new GLatLng(38.3522262573,-0.4046060145);
		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">CALAS DEL CABO DE LAS HUERTAS</b><br/><br/>Telf: (+34) <br><a class="nombre" href="calas_del_cabo_de_las_huertas.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.3694229126,-0.4143480062);
		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">CENTRO COMERCIAL FONTANA</b><br/>Avenida de Santander s/n<br/>Telf: (+34) <br><a class="nombre" href="centro_comercial_fontana.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.3614234924,-0.4475690126);
		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">PLAYA ALBUFERETA</b><br/>Avda. Condomina<br/>Telf: (+34) <br><a class="nombre" href="playa_albufereta.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.3607521057,-0.4359329939);
		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">PLAYA DE LA ALMADRABA</b><br/><br/>Telf: (+34) <br><a class="nombre" href="playa_de_la_almadraba.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.3769226074,-0.4088970125);
		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">PLAYA SAN JUAN</b><br/><br/>Telf: (+34) <br><a class="nombre" href="playa_san_juan.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.3647422791,-0.4324150085);
		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">ROTONDA SERGIO CARDELL</b><br/><br/>Telf: (+34) <br><a class="nombre" href="rotonda_sergio_cardell.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.3656196594,-0.4306550026);
		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">TORRE DON GARCIA</b><br/>Avenida Historiador Vicente Ramos<br/>Telf: (+34) <br><a class="nombre" href="torre_don_garcia.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.3706893921,-0.4362840056);
		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">TORRE SARRIÓ</b><br/>Glorieta de la Deportista Carolina Pascual<br/>Telf: (+34) <br><a class="nombre" href="torre_sarrio.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.3650627136,-0.4386590123);
		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">TOSSAL DE MANISSES</b><br/>C/Zeus, s/n<br/>Telf: (+34) 965149000<br><a class="nombre" href="tossal_de_manisses.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=6&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=6");
			}
		}
	}
	function cargar_todo() {
		map.clearOverlays();
		cargar_polyline();
		for(cant=1;cant<=16;cant++) {
			cargar_tipo(cant, 0);
		}
	}
	function cargar_polyline() {
		var encodedPoints = "oldiFvmtAhRgNsGuLvAsDiAuA}Mcb@cA}D}A_GLmEa@_Mz@gCbQ?fDha@`@xNRlPRpC??yBtAsD`@[dA}]zVsCIY`Cf@dB|AFhA_C??|]sV?kAgPwj@eCwMJcHg@cH?uA|AcAxBX";
		var encodedLevels = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB";

		var encodedPolyline1 = new GPolyline.fromEncoded({
			color: "#E10000",
			weight: 7,
			points: encodedPoints,
			levels: encodedLevels,
			zoomFactor: 32,
			numLevels: 4
		});
		map.addOverlay(encodedPolyline1);

		var encodedPoints = "ucdiFxcoAi~@bA??ti@?Yj{@jC{@{@}b@in@V~gAa@JwMwgAtA";
		var encodedLevels = "BBBBBBBBBBB";

		var encodedPolyline2 = new GPolyline.fromEncoded({
			color: "#FCDD45",
			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.3702612036274,-0.4240894317626953);
			map.addControl(new GSmallMapControl());
			
			map.addControl(new GMapTypeControl());		
			
			map.setCenter(center, 14);
			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>
