function load() { var myOptions = { zoom: zoom, center: latlng, mapTypeId: mapType, mapTypeControl: true, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR, position: google.maps.ControlPosition.TOP_RIGHT }, navigationControl: true, navigationControlOptions: { style: google.maps.NavigationControlStyle.SMALL, position: google.maps.ControlPosition.RIGHT_TOP }, }; // mapTypeId: google.maps.MapTypeId.ROADMAP geocoder = new google.maps.Geocoder(); map = new google.maps.Map(document.getElementById("map"), myOptions); // show ads var adNode = document.createElement('div'); adNode.innerHTML = ''; map.controls[google.maps.ControlPosition.TOP_LEFT].push(adNode); google.maps.event.addListenerOnce(map, 'tilesloaded', function() { (adsbygoogle = window.adsbygoogle || []).push({}); }); /** * Panoramio button */ var panoramioLayer = new google.maps.panoramio.PanoramioLayer(); var button = document.createElement("button"); button.innerHTML = "Fotos"; button.style.position = "absolute"; button.style.top = "5px"; button.style.right = "120px"; button.style.zIndex = 10; map.getDiv().appendChild(button); button.className = "btnmapunpressed"; button.onclick = function() { if (button.className == "btnmapunpressed") { panoramioLayer.setMap(map); button.className = "btnmappressed"; } else { panoramioLayer.setMap(null); button.className = "btnmapunpressed"; } } // map.setCenter(new GLatLng( -38.733331,-62.265755), 12, G_NORMAL_MAP); // setCenter(latlng) only in new api v3 //map.setCenter(new GLatLng( -38.733331,-62.265755)); //map.setZoom(12); // read the markers from the XML var mm = new MarkerManager(map, {borderPadding:1}); //alert(2); google.maps.event.addListener(mm, 'loaded', function () { var gmarkersA = []; var gmarkersB = []; var gmarkersC = []; var gmarkersD = []; var gmarkersE = []; var gmarkersF = []; var gmarkersG = []; var gmarkersH = []; //http://www.argentour.com/es/mapa/satelital/points.xml GDownloadUrl("http://www.argentour.com/es/mapa/satelital/puntos_zoom.xml", function (doc) { var xml = data.responseXML; var markers = xml.documentElement.getElementsByTagName("marker"); //alert("loaded"); for (var i = 0; i < markers.length; i++) { var point = new google.maps.LatLng( parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("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 ? "" : ""; // IFRAME: var marker = createMarker(point, titulo, "

" + titulo + "

" + hayClima +"

" + descripcion + "

Leer Más...

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

" + titulo + "

" + hayClima + descripcion + "

Leer Más...

", iconinfo); 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 + "

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

" + titulo + "

" + descripcion + "

", 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}); //var mm = new MarkerManager(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(); }); // fin downloadURL }); } function createMarker(point, name, html, icon) { var marker = new google.maps.Marker({ position: point, title: name, flat: false, icon: icon }); //shadow: icon.replace('.png','_shadow.png') var infowindow = new google.maps.InfoWindow({ maxWidth: 400, content: html }); google.maps.event.addListener(marker, 'click', function () { infowindow.open(map, marker); }); return marker; } function showAddress(address) { geocoder.geocode({ 'address': address }, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setZoom(15); map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ map: map, title: address, position: results[0].geometry.location }); } else { alert("Geocode was not successful for the following reason: " + status); } }); }