{"version":3,"file":"6746.33bb46eae7c1199b335a.js","mappings":"8NASA,IAAIA,EACAC,EAEJ,cAAqBC,EAAYC,KAC/BH,EAAYE,EACZD,EAAwBE,EAExBH,EAAUI,IAAIC,MAAKC,UACjBC,YAAWD,gBACH,OAAgBN,EAAUI,KAEhC,MACMI,EADgB,IAAIC,gBAAgBC,OAAOC,SAASC,QAC/BC,IAAI,WAW/B,IAAIC,EATe,IAAI,IAAiB,CACtCC,MAAO,OACPC,QAAS,IAAI,IAAiB,CAC5BD,MAAO,QACPE,MAAO,CAAC,IAAK,EAAG,GAChBC,MAAO,IAETD,MAAO,CAAC,EAAG,EAAG,EAAG,KAKjBH,EAFEb,EAAsBkB,IAET,yEAGAC,UAGjB,KAAuBN,EAAc,CACnCO,MAAO,cAAcb,KACrBc,gBAAgB,EAChBC,UAAW,CAAC,OACXC,MAAMC,IACP,IAAK,MAAMC,KAAWD,EAAQE,SAAU,CAItC,MAAMC,EAAS,IAAI,IAAmB,CACpCX,MAAO,CAAC,EAAG,EAAG,OAGVY,EAAU,IAAI,IAAQ,CAC1BC,SAAUJ,EAAQI,SAClBF,OAAQA,IAGV5B,EAAU+B,KAAKC,SAASC,IAAIJ,GAG5B7B,EAAU+B,KAAKG,KAAK,CAACC,OAAQT,EAASU,KAAM,IAC9C,IACA,GACD,KAAK,GAIX,C,kDCpEc9B,eAAe+B,EAAgBjC,SAChCA,EAAIC,OACV,MAAMiC,EAAgBlC,EAAImC,OAAOC,MAAMpC,KAAIqC,GACzC,MAAuB,IAAMA,EAAMC,WAGrC,aADMC,QAAQC,IAAIN,IACX,CACf,C","sources":["webpack://wingismaps/./src/extras/monCoordsMap.js","webpack://wingismaps/./src/util/areLayersLoaded.js"],"sourcesContent":["import Graphic from \"@arcgis/core/Graphic.js\";\r\nimport Point from \"@arcgis/core/geometry/Point.js\";\r\nimport Extent from \"@arcgis/core/geometry/Extent.js\";\r\nimport SimpleFillSymbol from \"@arcgis/core/symbols/SimpleFillSymbol.js\";\r\nimport SimpleLineSymbol from \"@arcgis/core/symbols/SimpleLineSymbol.js\";\r\nimport SimpleMarkerSymbol from \"@arcgis/core/symbols/SimpleMarkerSymbol.js\";\r\nimport * as query from \"@arcgis/core/rest/query.js\";\r\nimport areLayersLoaded from \"../util/areLayersLoaded\";\r\n\r\nlet WinGISMap;\r\nlet conditionalMapOptions;\r\n\r\nexport default async(_WinGISMap, _conditionalMapOptions) => {\r\n WinGISMap = _WinGISMap;\r\n conditionalMapOptions = _conditionalMapOptions;\r\n\r\n WinGISMap.map.when(async () => {\r\n setTimeout(async () => {\r\n await areLayersLoaded(WinGISMap.map); \r\n \r\n const StationCoords = new URLSearchParams(window.location.search);\r\n const StId = StationCoords.get('Station');\r\n \r\n const fillSymbol = new SimpleFillSymbol({\r\n style: \"none\",\r\n outline: new SimpleLineSymbol({\r\n style: \"solid\",\r\n color: [255, 0, 0],\r\n width: 3\r\n }),\r\n color: [0, 0, 0, 0]\r\n });\r\n let layerToQuery; \r\n if (conditionalMapOptions.WAN)\r\n {\r\n layerToQuery = \"https://agis.wingis.org/arcgis/rest/services/WinCoLayers/MapServer/169\"\r\n }\r\n else {\r\n layerToQuery = AllLayers;\r\n }\r\n \r\n query.executeQueryJSON(layerToQuery, {\r\n where: `STATION = '${StId}'`,\r\n returnGeometry: true,\r\n outFields: [\"*\"]\r\n }).then((results) => {\r\n for (const feature of results.features) {\r\n \r\n \r\n \r\n const symbol = new SimpleMarkerSymbol({\r\n color: [0, 0, 255]\r\n });\r\n \r\n const graphic = new Graphic({\r\n geometry: feature.geometry,\r\n symbol: symbol\r\n });\r\n \r\n WinGISMap.view.graphics.add(graphic);\r\n \r\n \r\n WinGISMap.view.goTo({target: feature, zoom: 16});\r\n }\r\n });\r\n }, 2500);\r\n\r\n\r\n })\r\n};\r\n","import * as reactiveUtils from \"@arcgis/core/core/reactiveUtils\";\r\nexport default async function areLayersLoaded(map) {\r\n await map.when(); \r\n const layerPromises = map.layers.items.map(layer => \r\n reactiveUtils.whenOnce(() => layer.loaded)\r\n );\r\n await Promise.all(layerPromises); \r\n return true; \r\n}"],"names":["WinGISMap","conditionalMapOptions","_WinGISMap","_conditionalMapOptions","map","when","async","setTimeout","StId","URLSearchParams","window","location","search","get","layerToQuery","style","outline","color","width","WAN","AllLayers","where","returnGeometry","outFields","then","results","feature","features","symbol","graphic","geometry","view","graphics","add","goTo","target","zoom","areLayersLoaded","layerPromises","layers","items","layer","loaded","Promise","all"],"sourceRoot":""}