From e91829d2153e1f9a807ba4e00386b8cd02521a3e Mon Sep 17 00:00:00 2001 From: claude-dev Date: Thu, 5 Mar 2026 13:08:45 +0100 Subject: [PATCH] Karte: Deutsche OSM-Kacheln, einheitlich fuer beide Themes - tile.openstreetmap.de statt OSM/CartoDB: deutsche Ortsnamen - Graue Vierecke behoben (Subdomain 'd' existierte nicht bei OSM) - Gleiche helle Karte in Dark und Light Mode - CSP img-src auf neuen Tile-Server aktualisiert Co-Authored-By: Claude Opus 4.6 --- src/main.py | 2 +- src/static/js/components.js | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/main.py b/src/main.py index 351a55c..ead984c 100644 --- a/src/main.py +++ b/src/main.py @@ -235,7 +235,7 @@ class SecurityHeadersMiddleware(BaseHTTPMiddleware): "script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; " "style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; " "font-src 'self' https://fonts.gstatic.com; " - "img-src 'self' data: https://*.basemaps.cartocdn.com https://*.tile.openstreetmap.org; " + "img-src 'self' data: https://tile.openstreetmap.de; " "connect-src 'self' wss: ws:; " "frame-ancestors 'none'" ) diff --git a/src/static/js/components.js b/src/static/js/components.js index 494d197..fb982b9 100644 --- a/src/static/js/components.js +++ b/src/static/js/components.js @@ -744,15 +744,11 @@ const UI = { if (layer instanceof L.TileLayer) this._map.removeLayer(layer); }); - const theme = document.documentElement.getAttribute('data-theme') || 'dark'; - const tileUrl = theme === 'dark' - ? 'https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png' - : 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; - const attribution = theme === 'dark' - ? '© OSM © CARTO' - : '© OpenStreetMap'; + // Deutsche OSM-Kacheln: deutsche Ortsnamen, einheitlich fuer beide Themes + const tileUrl = 'https://tile.openstreetmap.de/{z}/{x}/{y}.png'; + const attribution = '© OpenStreetMap'; - L.tileLayer(tileUrl, { attribution, maxZoom: 18, subdomains: 'abcd' }).addTo(this._map); + L.tileLayer(tileUrl, { attribution, maxZoom: 18 }).addTo(this._map); }, updateMapTheme() {