2022-12-12 21:42:54 +00:00
|
|
|
(()=>{"use strict";var e={407:(e,t,n)=>{var s=n(929),r=n(739),a=n(325),i=n(594);document.addEventListener("DOMContentLoaded",(()=>{c()}));let o=!1;const l=["Land Features","Bay","Channel","Cove","Dam","Delta","Gulf","Lagoon","Lake","Ocean","Reef","Reservoir","Sea","Sound","Strait","Waterfall","Wharf","Amusement Park","Historical Monument","Landmark","Tourist Attraction","Zoo","College","Beach","Campground","Golf Course","Harbor","Nature Reserve","Other Parks and Outdoors","Park","Racetrack","Scenic Overlook","Ski Resort","Sports Center","Sports Field","Wildlife Reserve","Airport","Ferry","Marina","Pier","Port","Resort","Postal","Populated Place"].join(","),c=()=>{document.getElementById("txtAddress").addEventListener("focus",(e=>{e.target.select()})),(0,a.uL)(y),document.getElementById("NavigateMenu").addEventListener("click",g),document.getElementById("NavigateRefresh").addEventListener("click",w),document.getElementById("NavigateNext").addEventListener("click",v),document.getElementById("NavigatePrevious").addEventListener("click",S),document.getElementById("NavigatePlay").addEventListener("click",M),document.getElementById("ToggleFullScreen").addEventListener("click",h),document.getElementById("btnGetGps").addEventListener("click",D),document.getElementById("divTwc").addEventListener("click",(()=>{document.fullscreenElement&&T()})),document.addEventListener("keydown",C),document.addEventListener("touchmove",(e=>{o&&e.preventDefault()})),$("#frmGetLatLng #txtAddress").devbridgeAutocomplete({serviceUrl:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest",deferRequestBy:300,paramName:"text",params:{f:"json",countryCode:"USA",category:l,maxSuggestions:10},dataType:"json",transformResult:e=>({suggestions:e.suggestions.map((e=>({value:e.text,data:e.magicKey})))}),minChars:3,showNoSuggestionNotice:!0,noSuggestionNotice:"No results found. Please try a different search string.",onSelect(e){u(e,this)},width:490}),$("#frmGetLatLng").on("submit",(()=>{const e=$("#frmGetLatLng #txtAddress").devbridgeAutocomplete();return e.suggestions[0]&&$(e.suggestionsContainer.children[0]).trigger("click"),!1}));const e=localStorage.getItem("latLonQuery"),t=localStorage.getItem("latLonLon");if(e&&t){document.getElementById("txtAddress").value=e,y(JSON.parse(t))}const n=localStorage.getItem("play");null!==n&&"true"!==n||I("navButton","play"),document.getElementById("btnClearQuery").addEventListener("click",(()=>{document.getElementById("spanCity").innerHTML="",document.getElementById("spanState").innerHTML="",document.getElementById("spanStationId").innerHTML="",document.getElementById("spanRadarId").innerHTML="",document.getElementById("spanZoneId").innerHTML="",document.getElementById("chkAutoRefresh").checked=!0,localStorage.removeItem("autoRefresh"),localStorage.removeItem("play"),I("navButton","play"),localStorage.removeItem("latLonQuery"),localStorage.removeItem("latLonLon")})),document.getElementById("container").addEventListener("swiped-left",(()=>p("left"))),document.getElementById("container").addEventListener("swiped-right",(()=>p("right")))},u=async(e,t)=>{if(t.previousSuggestionValue===e.value)return;const n=(await(0,s.AV)("https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find",{data:{text:e.value,magicKey:e.data,f:"json"}})).locations[0];n?d(n.feature.geometry):console.error("An unexpected error occurred. Please try a different search string.")},d=e=>{const t={lat:(0,i.Xp)(e.y,4),lon:(0,i.Xp)(e.x,4)};localStorage.setItem("latLonQuery",document.getElementById("txtAddress").value),localStorage.setItem("latLonLon",JSON.stringify(t)),y(t)},h=()=>(document.fullscreenElement?f():m(),(0,a.yA)()?(0,r.Z)(!0):(0,r.Z)(!1),T(),!1),m=()=>{const e=document.getElementById("divTwc"),t=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;t?t.call(e,{navigationUI:"hide"}):(window.scrollTo(0,0),o=!0),(0,a.SI)(),T();const n=document.getElementById("ToggleFullScreen");n.src="images/nav/ic_fullscreen_exit_white_24dp_1x.png",n.title="Exit fullscreen"},f=()=>{o&&(o=!1),d
|