Diagnose: /ui-vector-test — testet echten ui.js-Vektor-Pfad (UI.map.create) ohne Auth

This commit is contained in:
rene 2026-06-05 09:01:58 +02:00
parent b0fece16c8
commit 5cb7c3091d
3 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,23 @@
// Testet den ECHTEN ui.js-Vektor-Pfad: lädt die reale ui.js und baut die Karte
// via UI.map.create() — exakt wie die App. Beweist, ob UI.map.vectorEnabled()/
// vectorLayer() im realen ui.js-Kontext funktionieren (unabhängig von Auth/SW).
(function () {
'use strict';
var s = document.getElementById('status');
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?)');
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 });
var layers = [];
m.eachLayer(function (l) { layers.push(l.constructor && l.constructor.name); });
set('✅ Karte erstellt | vectorEnabled=' + enabled + ' | Layer: ' + layers.join(',') +
' | protomapsL=' + !!window.protomapsL + ' MapVector=' + !!window.MapVector);
} catch (e) {
set('❌ Fehler: ' + (e && e.message ? e.message : e));
console.error(e);
}
})();
})();