Refine building view dynamics
This commit is contained in:
+4
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user