Fix building view animation + some refactoring

This commit is contained in:
2026-09-15 18:47:05 +02:00
parent 91b1764913
commit 1c807cdc86
4 changed files with 62 additions and 40 deletions
+8 -1
View File
@@ -18,7 +18,14 @@ export default class extends Controller {
// Restore previous map state before closing view
const map = GisState.map;
map.removeLayer(GisState.baseLayers['Limiti amministrativi']);
map.removeLayer(GisState.cartography.buildings);
//map.removeLayer(GisState.cartography.buildings);
const walls = GisState.layers.walls;
// map.removeLayer(GisState.layers.walls) doesn't work, i.e.
// it doesn't remove the layer group (fails silently)
walls.eachLayer(layer => map.removeLayer(layer));
GisState.layers.walls.removeFrom(map);
map.addLayer(GisState.currentMapState.baseLayer);
map.setMinZoom(GisState.currentMapState.minZoom);