Add an Alt+click debug inspector, NPMap4-infobox style
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:
1 parent
d58580f4d9
commit
8fa3391c6b
4 files changed
+99
-1
No files matched your search
@@ -266,8 +266,16 @@ plugins (several still at `0.0.1-x`, pre-1.0), a few of which (`overview`,
|
||||
`carto`, `wms`) aren't even merged to `main` yet — see above. v5 is the
|
||||
direction NPS is migrating to, not (yet) a feature-for-feature
|
||||
replacement; expect this gap to close over time, not to stay this way.
|
||||
Two things worth noting from v4:
|
||||
Three things worth noting from v4:
|
||||
|
||||
* *`infoboxControl`* — example:
|
||||
https://www.nps.gov/lib/npmap.js/4.2.1/examples/basic/infobox.html. A
|
||||
generic "click anything, show every raw property in a table" debug
|
||||
view, kept separate from a dataset's own curated popup. *Adopted* — not
|
||||
the code (Leaflet, not portable) but the concept: this app now has the
|
||||
same thing as an Alt+click handler (see `docs/architecture.adoc`'s
|
||||
"Debug inspector" section), showing `queryRenderedFeatures` results —
|
||||
base map OSM tags included, not just this app's own layers.
|
||||
* *Geocoder control* — example:
|
||||
https://www.nps.gov/lib/npmap.js/4.2.1/examples/controls/geocoder-control.html.
|
||||
Config is `geocoderControl: { searchPlaces: true }`: a search box that
|
||||
|
||||
Reference in new issue
Block a user