1 export const simVars
= (function createSimVars() {
2 const urlParams
= new URLSearchParams(window
.location
.search
);
5 zoom
: urlParams
.get('zoom'),
6 pan
: urlParams
.get('pan'),
7 jobId
: urlParams
.get('job_id'),
8 domain
: urlParams
.get('domain'),
9 timestamp
: urlParams
.get('timestamp'),
11 startDate
: urlParams
.get('startDate'),
12 endDate
: urlParams
.get('endDate'),
13 opacity
: urlParams
.get('opacity'),
16 let pan
= urlParams
.get('pan');
18 pan
= pan
.split(',').map(coord
=> Number(coord
));
22 let rasters
= urlParams
.get('rasters');
24 rasters
= rasters
.split(',');
25 presetVars
.rasters
= rasters
;
29 currentSimulation
: '',
30 currentDescription
: '',
34 noLevels
: (function makeNoLevels() {
35 const noLevels
= new Set();
36 const makeKey
= (layerName
, domain
, timestamp
) => {
37 return layerName
+ ',' + domain
+ ',' + timestamp
;
39 const addNoLevels
= (layerName
, domain
, timestamp
) => {
40 let key
= makeKey(layerName
, domain
, timestamp
);
43 const hasNoLevels
= (layerName
, domain
, timestamp
) => {
44 let key
= makeKey(layerName
, domain
, timestamp
);
45 return noLevels
.has(key
);
51 clear
: () => noLevels
.clear()
57 displayedColorbar
: null,
60 overlayList
: ['WINDVEC', 'WINDVEC1000FT', 'WINDVEC4000FT', 'WINDVEC6000FT', 'SMOKE1000FT', 'SMOKE4000FT', 'SMOKE6000FT', 'FIRE_AREA', 'SMOKE_INT', 'FGRNHFX', 'FLINEINT'],
63 'MapQuest': L.tileLayer('http://{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', {
64 attribution: 'Data and imagery by MapQuest',
65 subdomains: ['otile1', 'otile2', 'otile3', 'otile4']}),
67 'MapQuest' : MQ
.mapLayer(),
68 /* 'MQ Satellite': L.tileLayer('http://{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', {
69 attribution: 'Data and imagery by MapQuest',
70 subdomains: ['otile1', 'otile2', 'otile3', 'otile4']}),*/
71 'OSM': L
.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
72 attribution
: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'})
75 clientWidth
: document
.body
.clientWidth
,
76 generateTimeSeriesCallback
: () => {},
77 cancelTimeSeriesCallback
: () => {},