city'; var marker0 = { latitude:39.15887, longitude:-108.72899, name:'Fruita' }; citiesPois.push(marker0); var marker1 = { latitude:39.07887, longitude:-108.63565, name:'Redlands' }; citiesPois.push(marker1); var marker2 = { latitude:39.19581, longitude:-108.81316, name:'Loma' }; citiesPois.push(marker2); var marker3 = { latitude:39.06387, longitude:-108.55065, name:'Grand Junction' }; citiesPois.push(marker3); var marker4 = { latitude:39.04304, longitude:-108.55232, name:'Orchard Mesa' }; citiesPois.push(marker4); var marker5 = { latitude:39.08165, longitude:-108.49676, name:'Fruitvale' }; citiesPois.push(marker5); var marker6 = { latitude:39.09193, longitude:-108.44898, name:'Clifton' }; citiesPois.push(marker6); var marker7 = { latitude:39.11026, longitude:-108.35092, name:'Palisade' }; citiesPois.push(marker7); var poisPois = []; var poiPois0 = { latitude:39.1517, longitude:-108.724, name:'Fruita', friendlyUrl:'Fruita', category:'(Populated areas, municipalities, cities and towns)', pk_id:831431 }; poisPois.push(poiPois0); var poiPois1 = { latitude:39.2075, longitude:-108.805, name:'Loma (Colorado)', friendlyUrl:'Loma-Colorado', category:'(Census-designated places)', pk_id:834472 }; poisPois.push(poiPois1); var poiPois2 = { latitude:39.085, longitude:-108.657, name:'Redlands (Colorado)', friendlyUrl:'Redlands-Colorado', category:'(Census-designated places)', pk_id:838073 }; poisPois.push(poiPois2); if(map) map.invalidateSize(true); var type, url; if(data == null){ data = { 'map_type':'WIKILOC', 'service_url':'http://es.wikiloc.com/wikiloc/view.do?id=183949', 'title':'Look for hiking trails maps', 'bbox':'POLYGON((-108.73418 39.10048,-108.72606 39.10048,-108.72606 39.1057,-108.73418 39.1057,-108.73418 39.10048))', 'friendly_url':'colorado-nm-canyon-rim-window-rock-trail', 'line_length': '2.2298553299581', 'producer':' ClipperCreekWanderer Todos los derechos reservados', 'pk_id':'905579', 'line_length':'2.2298553299581', 'min_h':'1643', 'max_h':'1760', 'avg_h':'1714.4', 'avg_aspect_up':'23.3634', 'avg_aspect_down':'-37.0767', 'hard_index':'13.0053' }; } if(data && data.map_type && data.friendly_url){ type = data.map_type; url = data.friendly_url; }else{ if(data && data.map_type && data.friendly_url){ type = data.map_type; url = data.friendly_url; }else{ alert("no se ha podido cargar el mapa"); return; } } //else if(map){ if(currentLayer){ if(currentLayer instanceof L.LayerGroup || currentLayer instanceof L.FeatureGroup) currentLayer.clearLayers(); map.removeLayer(currentLayer); currentLayer = null; } } showMap(url,type,-108.81316,39.04304,-108.35092,39.2075); showCitiesInMap(citiesPois, GEO_TABLE, CITY_TXT); showPoisInMap(poisPois); $("#exportGPX").on('click', function (event) { var gpxData = saveGpx(features_gpx); data = 'data:application/javascript;charset=utf-8,' + encodeURIComponent(gpxData); $(this).attr({ 'href': data, 'target': '_blank' }); }); $("#exportGPX").css('visibility', 'visible'); getAmazonAdd("#amazon1"); var ymin = 39.10048 - 0.1; var ymax = 39.10048 + 0.1; var xmin = -108.73418 - 0.1; var xmax = -108.73418 + 0.1; loadPanoramas(xmin, ymin, xmax, ymax); }; // });