var n=0; var icon = new GIcon(); icon.image = "http://www.argentour.com/images/info.png"; icon.shadow = "http://www.argentour.com/images/info_shadow.png"; icon.iconSize = new GSize(24, 24); icon.shadowSize = new GSize(45, 32); icon.iconAnchor = new GPoint(6, 20); icon.infoWindowAnchor = new GPoint(5, 1); iconblue = new GIcon(icon,"http://labs.google.com/ridefinder/images/mm_20_blue.png"); iconterminal = new GIcon(icon,"http://www.argentour.com/images/terminal.png"); iconterminal.shadow = "http://www.argentour.com/images/terminal_shadow.png"; iconterminal.iconSize = new GSize(24, 24); iconterminal.shadowSize = new GSize(45, 24); iconpuntos = new GIcon(icon,"http://www.argentour.com/images/camera.png"); iconpuntos.shadow = "http://www.argentour.com/images/camera_shadow.png"; iconpuntos.iconSize = new GSize(24, 24); iconpuntos.shadowSize = new GSize(45, 24); iconaeropuerto = new GIcon(icon,"http://www.argentour.com/images/aeropuerto.png"); iconaeropuerto.shadow = "http://www.argentour.com/images/aeropuerto_shadow.png"; iconaeropuerto.iconSize = new GSize(24, 24); iconaeropuerto.shadowSize = new GSize(45, 32); iconhospital = new GIcon(icon,"http://www.argentour.com/images/hospitales.png"); iconhospital.shadow = "http://www.argentour.com/images/hospitales_shadow.png"; iconhospital.iconSize = new GSize(24, 24); iconhospital.shadowSize = new GSize(45, 24); iconsupermarket = new GIcon(icon,"http://www.argentour.com/images/supermarket.png"); iconsupermarket.shadow = "http://www.argentour.com/images/supermarket_shadow.png"; iconsupermarket.iconSize = new GSize(24, 24); iconsupermarket.shadowSize = new GSize(45, 24); iconalojamiento = new GIcon(icon,"http://www.argentour.com/images/alojamiento.png"); iconalojamiento.shadow = "http://www.argentour.com/images/alojamiento_shadow.png"; iconsupermarket.iconSize = new GSize(24, 24); iconsupermarket.shadowSize = new GSize(45, 24); // new strategy - read the XML first, THEN create the map // read the markers from the XML var gmarkersA = []; var gmarkersB = []; var gmarkersC = []; var gmarkersD = []; var gmarkersE = []; var gmarkersF = []; var gmarkersG = []; var gmarkersH = []; GDownloadUrl("http://www.argentour.com/es/mapa/satelital/puntos_zoom.xml", function (doc) { var xmlDoc = GXml.parse(doc); var markers = xmlDoc.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { // obtain the attribues of each marker var lat = parseFloat(markers[i].getAttribute("lat")); var lng = parseFloat(markers[i].getAttribute("lng")); var point = new GLatLng(lat,lng); var titulo = markers[i].getAttribute("titulo"); var valor = markers[i].getAttribute("valor"); var descripcion = markers[i].getAttribute("descripcion"); var clima = markers[i].getAttribute("clima"); var imagen_publicidad = markers[i].getAttribute("imagen_publicidad"); var url_publicidad = markers[i].getAttribute("url_publicidad"); var url_articulo = markers[i].getAttribute("url_articulo"); var cod_yt = markers[i].getAttribute("cod_yt"); var descripcion_2 = markers[i].getAttribute("descripcion_2"); var pic = markers[i].getAttribute("pic"); var icono = markers[i].getAttribute("icono"); // split the markers into four arrays, with different GIcons if (parseInt(valor) == 7) { var hayClima = clima == 0 ? "" : "

"; var marker = createMarker(point,titulo,"

"+titulo+"


"+hayClima+""+descripcion+"

Leer Más...

",icon); gmarkersA.push(marker); } else if (parseInt(valor) == 6) { var marker = createMarker(point,titulo,"

"+titulo+"


"+descripcion+"

"+descripcion_2+"

",iconaeropuerto); gmarkersB.push(marker); } else if (parseInt(valor) == 5) { var marker = createMarker(point,titulo,"

"+titulo+"


"+descripcion+"

",iconterminal); gmarkersC.push(marker); } else if (parseInt(valor) == 4) { var marker = createMarker(point,titulo,"

"+titulo+"


"+descripcion+"

",iconsupermarket); gmarkersD.push(marker); } else if (parseInt(valor) == 3) { var marker = createMarker(point,titulo,"

"+titulo+"


"+descripcion+"

",iconhospital); gmarkersE.push(marker); } else if (parseInt(valor) == 2) { var marker = createMarker(point,titulo,"

"+titulo+"


"+descripcion+"

"+descripcion_2+"

",iconpuntos); gmarkersF.push(marker); } else if (parseInt(valor) == 1) { var marker = createMarker(point,titulo,"

"+titulo+"


"+descripcion+"

"+descripcion_2+"

",iconpuntos); gmarkersG.push(marker); } else if (parseInt(valor) == 8) { var marker = createMarker(point,titulo,"

"+titulo+"


"+descripcion+"

"+titulo+"

",iconalojamiento); gmarkersH.push(marker); } } // end for var mm = new GMarkerManager(map, {borderPadding:1}); mm.addMarkers(gmarkersA,0,17); mm.addMarkers(gmarkersB,8,17); mm.addMarkers(gmarkersC,10,17); mm.addMarkers(gmarkersD,10,17); mm.addMarkers(gmarkersE,11,17); mm.addMarkers(gmarkersF,12,17); mm.addMarkers(gmarkersG,15,17); mm.addMarkers(gmarkersH,10,17); mm.refresh(); }); // display a warning if the browser was not compatible } else { alert("Lamentablemente Google Maps API no es compatible con su navegador"); } } // fin load