Reorganize structure with entry point
This commit is contained in:
17
webgis/js/index.js
Normal file
17
webgis/js/index.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import GIS from './gis.js';
|
||||
import UI from './ui.js';
|
||||
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
let progress = document.querySelector('progress');
|
||||
const init = await GIS.initMap('map');
|
||||
progress.classList.add('is-hidden');
|
||||
let {map, sites} = init;
|
||||
|
||||
map._container.setAttribute('aria-busy', false);
|
||||
|
||||
UI.addCenterMapControl(map, GIS.CENTER_COORDS, GIS.INIT_ZOOM);
|
||||
UI.toggleMenu('siti');
|
||||
UI.toggleBurger('navbar-burger');
|
||||
UI.sitesMenu('.menu-list', map, sites);
|
||||
UI.projectInfo('#project-info');
|
||||
});
|
||||
Reference in New Issue
Block a user