Group Home/zoom/base-map into one top-left stack, NPS-style
Home was alone at top-left and zoom (NavigationControl) was down at bottom-right with GeolocateControl — split across two corners instead of grouped together like the National Park Service's own map controls (https://www.nps.gov/, screenshot: Home, zoom in/out, base map, all stacked in one place). Moved NavigationControl up to join Home (showCompass: false — this map never rotates, so a bearing-reset button would be dead weight), and added MapLayersButton, a small map-corner control that's a second entry point into the same Online/Offline panel LayerToggleControl already manages in the page's sidebar (both go through the same toggle() now, so there's one source of truth for whether the panel's open). GeolocateControl stays alone at bottom-right — it's a different action (go to my actual location) from Home (reset to the app's default view), which was worth clarifying since the two are easy to conflate.
This commit is contained in:
1 parent
be6d61e136
commit
215957382a
2 files changed
+70
-3
No files matched your search
+14
-1
@@ -139,7 +139,20 @@ back to the app's actual default is worth having: a "Home" button
|
||||
`home-button` MapLibre control — see `docs/third-party-notices.adoc`)
|
||||
sits top-left on the map, pinned to `CENTER`/`ZOOM` explicitly rather
|
||||
than its own fallback (the view at construction time, which would just
|
||||
be wherever a loaded permalink happened to point).
|
||||
be wherever a loaded permalink happened to point). It resets to the
|
||||
app's default view, not the visitor's own location — that's
|
||||
`GeolocateControl`, a separate button at bottom-right.
|
||||
|
||||
That Home button is the top of a small top-left stack — Home, zoom
|
||||
in/out (`NavigationControl`, `showCompass: false` since this map never
|
||||
rotates), and a "Base map" button — matching the National Park
|
||||
Service's own map control layout (grouped together on the map itself,
|
||||
rather than split between the map and a side panel). The last of
|
||||
those, `MapLayersButton` (`public/js/map.js`), is a second entry point
|
||||
into the exact same Online/Offline panel `LayerToggleControl` already
|
||||
manages in the page's own sidebar — both call the same
|
||||
`LayerToggleControl#toggle()`, so there's one source of truth for the
|
||||
panel's open/closed state either way.
|
||||
|
||||
== Weather radar overlay
|
||||
|
||||
|
||||
Reference in new issue
Block a user