Fix building view animation + some refactoring
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user