Refine building view dynamics

This commit is contained in:
2026-09-21 14:47:22 +02:00
parent 399612bad1
commit c23184060e
11 changed files with 99 additions and 57 deletions
+4 -3
View File
@@ -133,14 +133,14 @@ GIS.activateBuildingView = async function(layerId) {
map.addLayer(GisState.baseLayers['Limiti amministrativi']);
geometries.addTo(map);
// TODO: move to function in Map module??
// TODO: move to function in separate module??
const wallLayers = [];
// Cache!
for (let tech of TECH_LAYERS[layerId]) {
try {
const wallLayer = await this.loadGeoJSON(
`murarie/${layerId}/${tech}.geojson`,
Options.walls[tech] ?? {...Options.site, weight: 3},
Options.walls[tech] ?? {...Options.site, weight: 2.5},
true
);
@@ -161,9 +161,10 @@ GIS.activateBuildingView = async function(layerId) {
);
map.setMinZoom(this.BVIEW_MIN_ZOOM);
map.setMaxZoom(this.BVIEW_MAX_ZOOM);
GisState.bViewActive = true;
GisState.currentBView = layerId;
// Global event for Stimulus
document.dispatchEvent(new Event('bview-active'));
GisState.bViewActive = true;
}
/**
* Fetches references to cartography layers