Add an Alt+click debug inspector, NPMap4-infobox style
CI / check (push) Successful in 41s
CI / deploy (push) Successful in 13s

NPMap4 has infoboxControl: a generic "click anything, show every raw
property" debug view, kept separate from a dataset's own curated popup.
Not portable code (Leaflet), but the concept is: Alt+click anywhere now
opens a popup listing every rendered feature at that point via
map.queryRenderedFeatures — base map OSM tags included, not just this
app's own GPX/FIT/radar layers — with a raw key/value table per feature.

No dedicated UI for it on purpose: a keyboard-modified click needs no
button, toggle state, or cursor change of its own, and it's fine for it to
coexist with a layer's own click handler firing on the same click (e.g. a
GPX waypoint's normal popup) since this is a power-user/debugging
affordance, not a replacement for those. Feature properties can come from
an uploaded GPX/FIT file (untrusted input) via this app's own layers, so
every value is escaped the same way gpx.js's popups already are.
This commit is contained in:
randy committed 2026-09-07 20:34:15 +02:00
1 parent d58580f4d9
commit 8fa3391c6b
4 files changed
+99 -1

No files matched your search

+34
View File
@@ -438,6 +438,40 @@ html, body {
margin: 4px 0 0;
}
.debug-popup .maplibregl-popup-content {
max-height: 320px;
overflow-y: auto;
}
.debug-popup__feature {
font-size: 11px;
font-family: monospace;
}
.debug-popup__feature + .debug-popup__feature {
margin-top: 8px;
padding-top: 8px;
border-top: 1px solid #eee;
}
.debug-popup__feature table {
border-collapse: collapse;
width: 100%;
}
.debug-popup__feature th {
text-align: left;
color: #888;
font-weight: normal;
padding: 1px 6px 1px 0;
vertical-align: top;
white-space: nowrap;
}
.debug-popup__feature td {
word-break: break-word;
}
.gpx-popup__time {
color: #888;
font-size: 12px;