diff --git a/app.js b/app.js index 14a2dca..dbf94c4 100644 --- a/app.js +++ b/app.js @@ -1208,6 +1208,8 @@ document.addEventListener('DOMContentLoaded', async () => { }; try { + const projId = getProjektId(); + // Priority 1: Use globalThis.BAKED_DATA if available (Standalone Mode) if (globalThis.BAKED_DATA) { // Support both old format (direct layers) and new format (with mapping/statuses) @@ -1222,14 +1224,16 @@ document.addEventListener('DOMContentLoaded', async () => { } // Priority 2: Use globalThis.LAYER_CONFIG (Script-based config) or remote config - const layers = await resolveLayerConfig(isLocalFile, statusEl); - if (layers) { - await loadConfigLayers(layers); + // Only load local config layers if the project is the default (bwsamern-ohne) + if (projId.toLowerCase() === 'bwsamern-ohne') { + const layers = await resolveLayerConfig(isLocalFile, statusEl); + if (layers) { + await loadConfigLayers(layers); + } } // ALKIS aus Datenbank IMMER laden console.log("Lade ALKIS-Layer aus Datenbank..."); - const projId = getProjektId(); const alkisResp = await fetch(`/api/layers/alkis?project=${encodeURIComponent(projId)}`).catch(err => { console.error("Netzwerkfehler beim Laden des ALKIS-Layers:", err); return null;