fix(assets): declare mergedManagementZonesGeojson to prevent ReferenceError in unified view

This commit is contained in:
kdeterme 2026-10-05 16:38:43 +02:00
parent 3e35c98a46
commit 288921b4aa

View file

@ -53,6 +53,7 @@ var assetsLoadModes = {}; // thematic_code → null | 'always' | 'filter' |
// MapLibre sources
var mergedLocationsGeojson = { type: 'FeatureCollection', features: [] };
var mergedManagementZonesGeojson = { type: 'FeatureCollection', features: [] };
var mergedAssetsGeojson = { type: 'FeatureCollection', features: [] };
var currentFetchAbortController = null;
var assetClickPopup = null;
@ -2805,7 +2806,7 @@ function rebuildMapSources() {
const locSrc = map.getSource('locations');
const asstSrc = map.getSource('assets');
const zoneSrc = map.getSource('management_zones');
if (!locSrc || !asstSrc) return; // sources not yet added (before mapLoaded)
if (!locSrc || !asstSrc || !zoneSrc) return; // sources not yet added (before mapLoaded)
mergedLocationsGeojson = {
type: 'FeatureCollection',