Fix: zentrale Karte nutzte window.UI (undefined) statt bare UI → immer Raster-Branch

ui.js exponiert 'const UI' = globales lexikalisches Binding (bare UI), NICHT window.UI.
map.js _addBasemap prüfte window.UI → immer falsy → Vektor-Pfad nie genommen.
Jetzt: typeof UI-Check. (window.UI?.toast in boot/api/app sind separat tote No-Ops.)
This commit is contained in:
rene 2026-06-05 09:06:09 +02:00
parent 5cb7c3091d
commit 1d64dc5d70
7 changed files with 19 additions and 18 deletions

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung.
============================================================ */
const APP_VER = '1177'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VER = '1178'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VERSION = '1.6.0'; // ← semantische Version, wird bei make release gesetzt
window.APP_VER = APP_VER; // global verfügbar für andere Module (z.B. offline-indicator)
window.APP_VERSION = APP_VERSION;

View file

@ -748,7 +748,8 @@ window.Page_map = (() => {
_tileLayer.on('load', _applyTileTheme);
_applyTileTheme();
};
if (window.UI && UI.map.vectorEnabled && UI.map.vectorEnabled()) {
// ui.js exponiert UI als globales const (bare 'UI'), NICHT als window.UI!
if (typeof UI !== 'undefined' && UI.map && UI.map.vectorEnabled && UI.map.vectorEnabled()) {
UI.map.vectorLayer({ dark: _isDarkMode() }).then(layer => {
if (!_map) return;
_usingVector = true;

View file

@ -7,7 +7,7 @@
function set(t) { if (s) s.textContent = t; }
(async function () {
try {
if (!window.UI || !UI.map) return set('❌ UI.map nicht definiert (ui.js nicht geladen?)');
if (typeof UI === 'undefined' || !UI.map) return set('❌ UI.map nicht definiert (ui.js nicht geladen?)');
var enabled = UI.map.vectorEnabled ? UI.map.vectorEnabled() : 'METHODE FEHLT';
set('vectorEnabled=' + enabled + ' — erstelle Karte…');
var m = await UI.map.create('map', { center: [48.137, 11.576], zoom: 12 });