diff --git a/apps/workerslocation/templates/wklocation_map.html b/apps/workerslocation/templates/wklocation_map.html index 34b96b1..b6b4b87 100644 --- a/apps/workerslocation/templates/wklocation_map.html +++ b/apps/workerslocation/templates/wklocation_map.html @@ -81,13 +81,9 @@ await mapCore.initialize(); - // Инициализация переключателя слоев - const LayerSwitcherInner = document.getElementById('LayerSwitcherInner') - const layerSwitcher = new LayerSwitcher(mapCore, LayerSwitcherInner); - - const workerLayer = new ol.layer.Vector({source: new ol.source.Vector()}); workerLayer.set('title', 'Местоположение персонала') + workerLayer.set('name', 'vlo') const workerManager = new MarkerManager(workerLayer, VlocationStyleFunction); mapCore.addLayer(workerLayer, 'dynamic'); @@ -108,6 +104,7 @@ ) }); scanLayer.set('title', 'Ортофотоплан') + scanLayer.set('name', 'orto') mapCore.addLayer(scanLayer) const mineBorderLayer = new ol.layer.Vector({ @@ -119,6 +116,7 @@ style: polygonStyleFunction, }); mineBorderLayer.set('title', 'Границы ПРГР') + mineBorderLayer.set('name', 'prgr') mapCore.addLayer(mineBorderLayer) @@ -163,6 +161,11 @@ await updateMarkers(); setInterval(updateMarkers, 3000); + + // Инициализация переключателя слоев + const LayerSwitcherInner = document.getElementById('LayerSwitcherInner') + const layerSwitcher = new LayerSwitcher(mapCore, LayerSwitcherInner); + });