feat: public/config.json

This commit is contained in:
ISA
2025-08-20 14:45:47 +02:00
parent 22692f8153
commit d68b17c382
5 changed files with 11 additions and 6 deletions

View File

@@ -13,7 +13,8 @@ export const initializeMap = (
setPolylineEventsDisabled,
logError = false
) => {
const basePath = process.env.NEXT_PUBLIC_BASE_PATH;
// basePath wird aus config.json geladen (siehe unten)
let basePath = undefined;
if (
!mapContainer ||
@@ -80,6 +81,10 @@ export const initializeMap = (
}
}
if (config) {
// basePath aus config.json
if (typeof config.basePath === "string") {
basePath = config.basePath;
}
// Tile source
if (config.tileSources && config.active && config.tileSources[config.active]) {
const tileSource = config.tileSources[config.active];