mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-04 21:59:58 -05:00
map: clicking a POI shows its kind, detail, elevation and coordinates (#738)
The Protomaps basemap keeps a few attributes per POI beyond the name the map already labels: kind, kind_detail and elevation. Clicking a POI now opens a popup with those, plus the feature's coordinates (or the click location when the feature has no point). The same POI appears at several min_zoom levels within one tile, so features are deduped by name and kind. Map popups (this one and the existing pin popup) now follow the active theme's tokens instead of MapLibre's fixed white, covering light, dark, night and amber. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
15d3792b0e
commit
4fea50943b
4 changed files with 187 additions and 0 deletions
|
|
@ -725,3 +725,35 @@ tr.drag-deselecting td {
|
|||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
/* Map popups (POI details and pins) follow the active theme's tokens. */
|
||||
/* Scoped under .maplibregl-popup to outrank maplibre-gl.css, which loads after this file. */
|
||||
.maplibregl-popup .maplibregl-popup-content {
|
||||
background: var(--panel);
|
||||
color: var(--text);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
.maplibregl-popup .maplibregl-popup-close-button {
|
||||
color: var(--muted);
|
||||
}
|
||||
.maplibregl-popup .maplibregl-popup-close-button:hover {
|
||||
background: var(--head);
|
||||
color: var(--text);
|
||||
}
|
||||
.maplibregl-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip,
|
||||
.maplibregl-popup.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
|
||||
.maplibregl-popup.maplibregl-popup-anchor-top-right .maplibregl-popup-tip {
|
||||
border-bottom-color: var(--panel);
|
||||
}
|
||||
.maplibregl-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
|
||||
.maplibregl-popup.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
|
||||
.maplibregl-popup.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {
|
||||
border-top-color: var(--panel);
|
||||
}
|
||||
.maplibregl-popup.maplibregl-popup-anchor-left .maplibregl-popup-tip {
|
||||
border-right-color: var(--panel);
|
||||
}
|
||||
.maplibregl-popup.maplibregl-popup-anchor-right .maplibregl-popup-tip {
|
||||
border-left-color: var(--panel);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue