const markerConfig={'finish':{className:'marker_finish',size:[58,58],offset:[0,-29],span:false,best:false,text:false,},'start':{className:'marker_start',size:[58,58],offset:[0,-29],span:false,best:false,text:false,},'star':{className:'marker_star',size:[58,58],offset:[0,-29],span:false,best:false,text:false,},'numbered':{className:'mapMarkerNum',size:false,offset:[0,0],span:true,best:true,text:false,},'star-plain':{className:'mapMarkerNum markerSpanRed',size:false,offset:[0,0],span:true,best:false,text:'☆',},'grey':{className:'mapMarkerNum markerSpanGrey',size:false,offset:[0,0],span:true,best:false,text:false,},};function addMarkersToMap(m,f=null){Object.values(markerData[m]).forEach((i,n)=>{if(f!==null&&n'+t+'';} if(mC.width&&mC.height){el.style.width=mC.width+'px';el.style.height=mC.height+'px';} var marker=new mapboxgl.Marker(el,{offset:mC.offset}).setLngLat(i.lonLat).addTo(window.contentMaps[m]);marker.markerType=i.iconType;if(f!==null){} i.marker=marker;window.bounds[m].extend(i.lonLat);if(i.c){marker.getElement().addEventListener('click',function(){event.stopPropagation();toggleMapIconClick(m,n,true);});}});}if(typeof window.contentMaps==='undefined'){window.contentMaps={};window.initialMapBounds={};} if(typeof window.bounds==='undefined'){window.bounds={};} if(typeof window.markerData==='undefined'){window.markerData={};} if(!markerData[1]){markerData[1]={};} function initMapbox_1(){mapboxgl.accessToken='pk.eyJ1IjoibGF6eXRyaXBzIiwiYSI6ImNsaTJ4anh2MTA5NDYzZW85ODJmMm45ZzcifQ.9u5pN47V7SsoFwF6_Pw5bQ';const contentMap_1=new mapboxgl.Map({container:'contentMap_1',style:'mapbox://styles/mapbox/streets-v11',center:[-110.67456604651362,43.787637379950866],zoom:8,cooperativeGestures:true});window.contentMaps[1]=contentMap_1;if(typeof window.bounds[1]==='undefined'){window.bounds[1]=new mapboxgl.LngLatBounds();} const contentFinish_1_1=[-110.54873214343348,43.863457744630296];const contentFinish_1_1_geoson={'type':'FeatureCollection','features':[{'type':'Feature','geometry':{'type':'Point','coordinates':contentFinish_1_1},'properties':{'title':'Finish','description':'Finish point'}}]};for(const feature of contentFinish_1_1_geoson.features){const el=document.createElement('div');el.className='marker_star';new mapboxgl.Marker(el,{offset:[0,-29]}).setLngLat(feature.geometry.coordinates).addTo(contentMap_1);} window.bounds[1].extend(contentFinish_1_1);const contentFinish_1_2=[-110.67040547191564,43.711745000497984];const contentFinish_1_2_geoson={'type':'FeatureCollection','features':[{'type':'Feature','geometry':{'type':'Point','coordinates':contentFinish_1_2},'properties':{'title':'Finish','description':'Finish point'}}]};for(const feature of contentFinish_1_2_geoson.features){const el=document.createElement('div');el.className='marker_star';new mapboxgl.Marker(el,{offset:[0,-29]}).setLngLat(feature.geometry.coordinates).addTo(contentMap_1);} window.bounds[1].extend(contentFinish_1_2);const contentFinish_1_3=[-110.66447927558781,43.66589979124879];const contentFinish_1_3_geoson={'type':'FeatureCollection','features':[{'type':'Feature','geometry':{'type':'Point','coordinates':contentFinish_1_3},'properties':{'title':'Finish','description':'Finish point'}}]};for(const feature of contentFinish_1_3_geoson.features){const el=document.createElement('div');el.className='marker_star';new mapboxgl.Marker(el,{offset:[0,-29]}).setLngLat(feature.geometry.coordinates).addTo(contentMap_1);} window.bounds[1].extend(contentFinish_1_3);const contentFinish_1_4=[-110.62414281163521,43.75377010995615];const contentFinish_1_4_geoson={'type':'FeatureCollection','features':[{'type':'Feature','geometry':{'type':'Point','coordinates':contentFinish_1_4},'properties':{'title':'Finish','description':'Finish point'}}]};for(const feature of contentFinish_1_4_geoson.features){const el=document.createElement('div');el.className='marker_star';new mapboxgl.Marker(el,{offset:[0,-29]}).setLngLat(feature.geometry.coordinates).addTo(contentMap_1);} window.bounds[1].extend(contentFinish_1_4);const contentFinish_1_5=[-110.57384290237206,43.87312576202914];const contentFinish_1_5_geoson={'type':'FeatureCollection','features':[{'type':'Feature','geometry':{'type':'Point','coordinates':contentFinish_1_5},'properties':{'title':'Finish','description':'Finish point'}}]};for(const feature of contentFinish_1_5_geoson.features){const el=document.createElement('div');el.className='marker_star';new mapboxgl.Marker(el,{offset:[0,-29]}).setLngLat(feature.geometry.coordinates).addTo(contentMap_1);} window.bounds[1].extend(contentFinish_1_5);const contentFinish_1_6=[-110.64838557579355,43.70373709671262];const contentFinish_1_6_geoson={'type':'FeatureCollection','features':[{'type':'Feature','geometry':{'type':'Point','coordinates':contentFinish_1_6},'properties':{'title':'Finish','description':'Finish point'}}]};for(const feature of contentFinish_1_6_geoson.features){const el=document.createElement('div');el.className='marker_star';new mapboxgl.Marker(el,{offset:[0,-29]}).setLngLat(feature.geometry.coordinates).addTo(contentMap_1);} window.bounds[1].extend(contentFinish_1_6);const contentFinish_1_7=[-110.73021454169424,43.76322196954207];const contentFinish_1_7_geoson={'type':'FeatureCollection','features':[{'type':'Feature','geometry':{'type':'Point','coordinates':contentFinish_1_7},'properties':{'title':'Finish','description':'Finish point'}}]};for(const feature of contentFinish_1_7_geoson.features){const el=document.createElement('div');el.className='marker_star';new mapboxgl.Marker(el,{offset:[0,-29]}).setLngLat(feature.geometry.coordinates).addTo(contentMap_1);} window.bounds[1].extend(contentFinish_1_7);const contentFinish_1_8=[-110.74854610011434,43.76777335957614];const contentFinish_1_8_geoson={'type':'FeatureCollection','features':[{'type':'Feature','geometry':{'type':'Point','coordinates':contentFinish_1_8},'properties':{'title':'Finish','description':'Finish point'}}]};for(const feature of contentFinish_1_8_geoson.features){const el=document.createElement('div');el.className='marker_star';new mapboxgl.Marker(el,{offset:[0,-29]}).setLngLat(feature.geometry.coordinates).addTo(contentMap_1);} window.bounds[1].extend(contentFinish_1_8);const contentFinish_1_9=[-110.66227381062339,43.98227821664526];const contentFinish_1_9_geoson={'type':'FeatureCollection','features':[{'type':'Feature','geometry':{'type':'Point','coordinates':contentFinish_1_9},'properties':{'title':'Finish','description':'Finish point'}}]};for(const feature of contentFinish_1_9_geoson.features){const el=document.createElement('div');el.className='marker_star';new mapboxgl.Marker(el,{offset:[0,-29]}).setLngLat(feature.geometry.coordinates).addTo(contentMap_1);} window.bounds[1].extend(contentFinish_1_9);const contentFinish_1_10=[-110.7153037792111,43.66028359110067];const contentFinish_1_10_geoson={'type':'FeatureCollection','features':[{'type':'Feature','geometry':{'type':'Point','coordinates':contentFinish_1_10},'properties':{'title':'Finish','description':'Finish point'}}]};for(const feature of contentFinish_1_10_geoson.features){const el=document.createElement('div');el.className='marker_star';new mapboxgl.Marker(el,{offset:[0,-29]}).setLngLat(feature.geometry.coordinates).addTo(contentMap_1);} window.bounds[1].extend(contentFinish_1_10);const contentFinish_1_11=[-110.73329044752408,43.78482936024081];const contentFinish_1_11_geoson={'type':'FeatureCollection','features':[{'type':'Feature','geometry':{'type':'Point','coordinates':contentFinish_1_11},'properties':{'title':'Finish','description':'Finish point'}}]};for(const feature of contentFinish_1_11_geoson.features){const el=document.createElement('div');el.className='marker_star';new mapboxgl.Marker(el,{offset:[0,-29]}).setLngLat(feature.geometry.coordinates).addTo(contentMap_1);} window.bounds[1].extend(contentFinish_1_11);initialMapBounds[1]=new mapboxgl.LngLatBounds(window.bounds[1].getSouthWest(),window.bounds[1].getNorthEast());const visibleMapRoutes_1=[];contentMaps[1].on('click',(e)=>{resetMarkersAndCards(1);});addMarkersToMap(1);contentMap_1.fitBounds(window.bounds[1],{padding:{top:60,bottom:60,left:60,right:60}});} var mapScriptCreated = 0; var mapCssCreated = 0; var mapScriptLoaded = 0; var mapCssLoaded = 0; var mapLoadList = []; function showLazyMap(fname) { if (mapScriptLoaded == 1 && mapCssLoaded == 1) { if (!mapLoadList.includes(fname)) { window[fname](); mapLoadList.push(fname); } } } (function fn() { var pics = document.querySelectorAll('.no-js-hide'); pics.forEach(function(pic) { pic.classList.toggle('no-js-hide'); }); var lazyImages = [].slice.call(document.querySelectorAll(".lazeeload")); if ("IntersectionObserver" in window) { const config = { root: null, rootMargin: '1000px', threshold: 0 }; let lazyImageObserver = new IntersectionObserver(function(entries, observer) { entries.forEach(function(entry) { if (entry.isIntersecting) { let lazyImage = entry.target; if (lazyImage.dataset.src) {lazyImage.src = lazyImage.dataset.src;} if (lazyImage.dataset.srcset) {lazyImage.srcset = lazyImage.dataset.srcset;} if (lazyImage.dataset.map) { const fname = "initMapbox_"+lazyImage.dataset.map; if (mapScriptLoaded == 0) { let script = document.createElement('script'); script.async=true; script.defer=true; script.src = "https://api.mapbox.com/mapbox-gl-js/v3.0.0/mapbox-gl.js"; script.onload = function(){ mapScriptLoaded = 1; showLazyMap(fname); } document.head.appendChild(script); mapScriptCreated = 1; let css = document.createElement('link'); css.rel = "stylesheet"; css.href = "https://api.mapbox.com/mapbox-gl-js/v3.0.0/mapbox-gl.css"; css.onload = function(){ mapCssLoaded = 1; showLazyMap(fname); } document.head.appendChild(css); mapCssCreated = 1; } else { if (typeof window[fname] === 'function') { window[fname](); } showLazyMap(fname); } } lazyImage.classList.remove("no-js-hide"); lazyImage.classList.remove("lazeeload"); lazyImageObserver.unobserve(lazyImage); } }); }, config); lazyImages.forEach(function(lazyImage) { lazyImageObserver.observe(lazyImage); lazyImage.classList.add("lazeeload-activated"); }); } else { let active = false; const lazyLoad = function() { if (active === false) { active = true; setTimeout(function() { lazyImages.forEach(function(lazyImage) { if ((lazyImage.getBoundingClientRect().top <= window.innerHeight+1000 && lazyImage.getBoundingClientRect().bottom >= 0) && getComputedStyle(lazyImage).display !== "none") { if (lazyImage.dataset.src) lazyImage.src = lazyImage.dataset.src; if (lazyImage.dataset.srcset) lazyImage.srcset = lazyImage.dataset.srcset; if (lazyImage.dataset.onload) lazyImage.onload = lazyImage.dataset.onload; lazyImage.classList.remove("lazeeload"); lazyImages = lazyImages.filter(function(image) { return image !== lazyImage; }); if (lazyImages.length === 0) { document.removeEventListener("scroll", lazyLoad); window.removeEventListener("resize", lazyLoad); window.removeEventListener("orientationchange", lazyLoad); } } }); active = false; }, 200); } }; document.addEventListener("scroll", lazyLoad); window.addEventListener("resize", lazyLoad); window.addEventListener("orientationchange", lazyLoad); } var lazyImages = [].slice.call(document.querySelectorAll(".lazeeload")); i=1; lazyImages.forEach(function(lazyImage) { if (!(lazyImage.classList.contains("lazeeload-activated"))) { if (lazyImage.dataset.src) lazyImage.src = lazyImage.dataset.src; if (lazyImage.dataset.srcset) lazyImage.srcset = lazyImage.dataset.srcset; lazyImage.classList.remove("lazeeload"); } }); })(); document.addEventListener('DOMContentLoaded', () => { const h = document.querySelector('header.fixed-top'), o = getComputedStyle(h).right; ['show.bs.modal', 'hidden.bs.modal'].forEach(e => document.querySelectorAll('.fullScreenModal').forEach(m => m.addEventListener(e, ev => h.style.right = ev.type === 'show.bs.modal' ? `${window.innerWidth - document.documentElement.clientWidth}px` : o))); });