From 6ad6565cf25e60f1a1a68b47f71db94265c404aa Mon Sep 17 00:00:00 2001 From: EiSiMo Date: Thu, 23 Apr 2026 13:41:12 +0200 Subject: [PATCH] ui(map): red overlay for excluded Bezirke, drop Leaflet attribution prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Excluded-district shading switches from amber/yellow to a soft red (fill #fca5a5 at 0.3 opacity, stroke #c84545) — reads as "blocked" rather than "highlighted", which matches the meaning better. - Drop the "Leaflet" attribution prefix (not legally required). Keep "© OpenStreetMap · © CARTO" — ODbL and CARTO's basemap terms both require attribution. Co-Authored-By: Claude Opus 4.7 (1M context) --- web/static/map.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/web/static/map.js b/web/static/map.js index 966aa15..8e3ec25 100644 --- a/web/static/map.js +++ b/web/static/map.js @@ -155,9 +155,9 @@ function renderMarkers(payload) { ensureDistrictLayer(selectedDistricts); } -// EXPERIMENT: faintly highlight Bezirke the user's filter EXCLUDES so the -// active selection is obvious at a glance. When the filter is empty (no -// district narrowing) the layer is hidden — nothing is excluded. +// Faintly highlight Bezirke the user's filter EXCLUDES so the active +// selection is obvious at a glance. When the filter is empty (no district +// narrowing) the layer is hidden — nothing is excluded. function districtStyle(selectedSet) { const showShading = selectedSet.size > 0; return (feature) => { @@ -165,12 +165,12 @@ function districtStyle(selectedSet) { const excluded = showShading && !selectedSet.has(name); return { stroke: excluded, - color: "#c89318", + color: "#c84545", weight: 1, - opacity: 0.55, + opacity: 0.6, fill: excluded, - fillColor: "#fde68a", - fillOpacity: 0.35, + fillColor: "#fca5a5", + fillOpacity: 0.3, }; }; } @@ -217,6 +217,9 @@ function buildMap(el) { touchZoom: false, keyboard: false, }).setView(BERLIN_CENTER, BERLIN_ZOOM); + // Drop the "Leaflet" prefix — not legally required. OSM (ODbL) and CARTO's + // basemap terms both REQUIRE attribution, so those credits stay. + mapInstance.attributionControl.setPrefix(false); // CartoDB Voyager — clean, Google-Maps-ish base style. L.tileLayer("https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png", { attribution: "© OpenStreetMap · © CARTO",