ui(map): red overlay for excluded Bezirke, drop Leaflet attribution prefix
- 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) <noreply@anthropic.com>
This commit is contained in:
parent
2ebbf76a80
commit
6ad6565cf2
1 changed files with 10 additions and 7 deletions
|
|
@ -155,9 +155,9 @@ function renderMarkers(payload) {
|
||||||
ensureDistrictLayer(selectedDistricts);
|
ensureDistrictLayer(selectedDistricts);
|
||||||
}
|
}
|
||||||
|
|
||||||
// EXPERIMENT: faintly highlight Bezirke the user's filter EXCLUDES so the
|
// Faintly highlight Bezirke the user's filter EXCLUDES so the active
|
||||||
// active selection is obvious at a glance. When the filter is empty (no
|
// selection is obvious at a glance. When the filter is empty (no district
|
||||||
// district narrowing) the layer is hidden — nothing is excluded.
|
// narrowing) the layer is hidden — nothing is excluded.
|
||||||
function districtStyle(selectedSet) {
|
function districtStyle(selectedSet) {
|
||||||
const showShading = selectedSet.size > 0;
|
const showShading = selectedSet.size > 0;
|
||||||
return (feature) => {
|
return (feature) => {
|
||||||
|
|
@ -165,12 +165,12 @@ function districtStyle(selectedSet) {
|
||||||
const excluded = showShading && !selectedSet.has(name);
|
const excluded = showShading && !selectedSet.has(name);
|
||||||
return {
|
return {
|
||||||
stroke: excluded,
|
stroke: excluded,
|
||||||
color: "#c89318",
|
color: "#c84545",
|
||||||
weight: 1,
|
weight: 1,
|
||||||
opacity: 0.55,
|
opacity: 0.6,
|
||||||
fill: excluded,
|
fill: excluded,
|
||||||
fillColor: "#fde68a",
|
fillColor: "#fca5a5",
|
||||||
fillOpacity: 0.35,
|
fillOpacity: 0.3,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -217,6 +217,9 @@ function buildMap(el) {
|
||||||
touchZoom: false,
|
touchZoom: false,
|
||||||
keyboard: false,
|
keyboard: false,
|
||||||
}).setView(BERLIN_CENTER, BERLIN_ZOOM);
|
}).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.
|
// CartoDB Voyager — clean, Google-Maps-ish base style.
|
||||||
L.tileLayer("https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png", {
|
L.tileLayer("https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png", {
|
||||||
attribution: "© OpenStreetMap · © CARTO",
|
attribution: "© OpenStreetMap · © CARTO",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue