wms: layer added to map with control

This commit is contained in:
2025-06-30 10:07:45 +02:00
parent 09d5a31a07
commit 6f632c3ee2
4 changed files with 31 additions and 16 deletions

View File

@@ -33,6 +33,14 @@ export default class extends Controller {
else map.removeLayer(currentLayer);
}
toggleCadastral() {
const map = GisState.map;
const wms = GisState.cartography.cadastral;
if (!map.hasLayer(wms)) map.addLayer(wms);
else map.removeLayer(wms);
}
/**
* @todo Use Stimulus values?
* @param {Event} event