experiment: shade excluded Bezirke on map (faint yellow overlay)
Tints districts the user's Bezirk filter has EXCLUDED in light yellow
(#fde68a, fillOpacity 0.35) so the active selection is obvious from
the map alone — and you can see at a glance whether a "rausgefiltert"
flat fell in a no-go district. When no district filter is set the
overlay stays off entirely (nothing is excluded).
Wiring:
- Berlin Bezirke GeoJSON checked in at web/static/berlin-districts.geojson
(12 features, name property matches our DISTRICTS list 1:1, props
stripped down to {name} and minified — 312KB raw, ~80KB gzipped).
- Route exposes the user's selected_districts_csv to the template.
- The flats-map-data <script> carries it on data-selected-districts so
it flows in alongside csrf and the marker payload.
- map.js fetches the GeoJSON once (cache normally), keeps the layer in
a module-level reference, and re-styles it via setStyle() on every
swap (cheap). Marker layer is kicked to the front so pins always
paint above the shaded polygons. fingerprintOf now also folds in
the selected-districts CSV so a Bezirk-only filter change still
triggers a re-render.
Branch only — kept off main while we see if this reads well.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
85f5f364ed
commit
2ebbf76a80
4 changed files with 92 additions and 12 deletions
|
|
@ -103,7 +103,9 @@
|
|||
<div id="flats-map" hx-preserve="true"></div>
|
||||
</div>
|
||||
</section>
|
||||
<script id="flats-map-data" type="application/json" data-csrf="{{ csrf }}">{{ map_points | tojson }}</script>
|
||||
<script id="flats-map-data" type="application/json"
|
||||
data-csrf="{{ csrf }}"
|
||||
data-selected-districts="{{ selected_districts_csv }}">{{ map_points | tojson }}</script>
|
||||
|
||||
<!-- Liste -->
|
||||
<section class="view-list card">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue