Home button fits all of Slovakia; add an overview map, top-right
CI / check (push) Successful in 1m33s
CI / deploy (push) Successful in 27s

Home now fitBounds()s a country-wide bbox instead of resetting to
CENTER/ZOOM's Bratislava point, since Home resetting into the same
city you'd already be looking at wasn't useful.

The overview map is NPS's own overview plugin (npmap5-plugins, still
on an unmerged branch), vendored and converted from its UMD dist
build to a plain ES module. Patched one MapLibre API break found while
verifying it: the plugin reads map.transform (public in the MapLibre
~2.4 it targets) to relax the inset's polar pan limit; MapLibre 6 (this
app's vendored version) no longer exposes .transform at all, so it
threw on load. Guarded to skip that cosmetic adjustment when absent
instead.
This commit is contained in:
randy committed 2026-09-07 22:30:56 +02:00
1 parent ddf2ee4990
commit 96065b1237
7 files changed
+441 -31

No files matched your search

+13 -8
View File
@@ -27,6 +27,10 @@ checking here before searching from zero next time.
| Park Tiles color palette (offline basemap theme)
| `public/js/map.js`'s `OFFLINE_THEME`
| Colors only — see <<park-tiles>> for why the actual tile service isn't used
| `overview` (top-right minimap/inset control)
| `public/vendor/npmap-overview/`
| MIT (per that branch's `package.json`); same public-domain repo as above
|===
See `docs/third-party-notices.adoc` for the formal vendored-library
@@ -99,18 +103,19 @@ https://github.com/nationalparkservice/npmap5-plugins/issues/7[#7].
=== On unmerged feature branches (less vetted — not on `main` yet)
`overview` (branch `maplibre-gl-overview`) has since been adopted —
see "What this app actually uses" above and
`docs/architecture.adoc`'s control-stack section. Live demo (as
upstream ships it, unpatched):
https://raw.githack.com/nationalparkservice/npmap5-plugins/maplibre-gl-overview/examples/index.html.
Note: MapLibre GL JS has no first-party minimap of its own — this
isn't more "official" than any other third-party minimap plugin, just
NPS-flavored.
[cols="1,3"]
|===
| Plugin | What it is
| `overview` (branch `maplibre-gl-overview`)
| A minimap/inset control, any corner, respects pitch/bearing. Live
demo: https://raw.githack.com/nationalparkservice/npmap5-plugins/maplibre-gl-overview/examples/index.html.
Note: MapLibre GL JS has no first-party minimap of its own — this
wouldn't be more "official" than any other third-party minimap
plugin, just NPS-flavored. No minimap has been requested for this
app; would be a nice-to-have, not a fix for anything.
| `carto` (branch `maplibre-gl-carto-source`)
| Adds a vector-tile source backed by Carto.com-hosted data. Only
useful if we actually have a Carto-hosted dataset to point at — we