1 import { getConfigurations
} from './services.js';
2 import { simVars
} from './simVars.js';
4 // construct map with the base layers
5 export const map
= (function buildMap() {
7 let center
= [39.7392, -104.9903];
8 let presetCenter
= simVars
.presets
.pan
;
9 if (presetCenter
&& presetCenter
.length
== 2) {
11 } else if (simVars
.organization
.includes('SJSU')) {
12 center
= [37.34, -121.89];
15 let presetZoom
= simVars
.presets
.zoom
;
16 if (presetZoom
&& !isNaN(presetZoom
)) {
19 let leafletMap
= L
.map('map-fd', {
21 layers
: [simVars
.baseLayerDict
['OSM']],
28 leafletMap
.doubleClickZoom
.disable();
29 leafletMap
.scrollWheelZoom
.disable();
31 // add scale & zoom controls to the map
32 L
.control
.scale({ position
: 'bottomright' }).addTo(leafletMap
);