Tile-Server: Isolations-Testseite /leaflet-vector-test (protomaps-leaflet + DACH, ohne App-Shell)
This commit is contained in:
parent
647aa684db
commit
736c326635
3 changed files with 53 additions and 0 deletions
24
backend/static/js/leaflet-vector-test.js
Normal file
24
backend/static/js/leaflet-vector-test.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
// Isolationstest: rendert die DACH-PMTiles direkt via protomaps-leaflet + map-vector.js,
|
||||
// OHNE App-Shell, ohne Feature-Flag, ohne SW-Komplikationen. Beweist, ob die
|
||||
// Vektor-Basemap-Kette an sich funktioniert.
|
||||
(function () {
|
||||
'use strict';
|
||||
var st = document.getElementById('status');
|
||||
function set(t) { if (st) st.textContent = t; }
|
||||
try {
|
||||
if (!window.L) return set('❌ Leaflet nicht geladen');
|
||||
if (!window.protomapsL) return set('❌ protomaps-leaflet nicht geladen');
|
||||
if (!window.MapVector) return set('❌ MapVector nicht geladen');
|
||||
|
||||
var map = L.map('map', { attributionControl: false }).setView([48.137, 11.576], 12); // München
|
||||
L.control.attribution({ prefix: false }).addTo(map)
|
||||
.addAttribution('© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors');
|
||||
|
||||
var layer = MapVector.basemapLayer({ dark: false });
|
||||
layer.addTo(map);
|
||||
set('✅ Vektor-Layer hinzugefügt — Tiles: ' + MapVector.tilesUrl());
|
||||
} catch (e) {
|
||||
set('❌ Fehler: ' + (e && e.message ? e.message : e));
|
||||
console.error('Isolationstest-Fehler:', e);
|
||||
}
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue