From 74a271d32dbf5f82ea86d431a2176c1c05998018 Mon Sep 17 00:00:00 2001 From: zakhy <=> Date: Mon, 14 Apr 2025 17:32:43 +0700 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20na?= =?UTF-8?q?me?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/workerslocation/templates/wklocation_map.html | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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); + });