diff --git a/docs/architecture.adoc b/docs/architecture.adoc index 765e3ea..e15583f 100644 --- a/docs/architecture.adoc +++ b/docs/architecture.adoc @@ -145,8 +145,11 @@ app's default view, not the visitor's own location — that's That Home button is the top of a small top-left stack — Home, zoom in/out (`NavigationControl`, `showCompass: false` since this map never -rotates), locate-me (`GeolocateControl`), and a "Base map" button — -matching the National Park Service's own map control layout (grouped +rotates), a passive zoom-level readout (`ZoomLevelControl`, a plain div +updated on the map's `zoom` event — not a button, since it has no +click behavior of its own), locate-me (`GeolocateControl`), and a +"Base map" button — matching the National Park Service's own map +control layout (grouped together on the map itself, rather than split across corners or between the map and a side panel). The last of those, `MapLayersButton` (`public/js/map.js`), is a second entry point into diff --git a/public/css/style.css b/public/css/style.css index 6451c32..2421d1b 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -472,6 +472,18 @@ html, body { word-break: break-word; } +.zoom-level-ctrl__value { + width: 29px; + height: 29px; + display: flex; + align-items: center; + justify-content: center; + font-size: 12px; + font-weight: 600; + color: #333; + user-select: none; +} + .gpx-popup__time { color: #888; font-size: 12px; diff --git a/public/js/map.js b/public/js/map.js index 1ec1431..a26ef24 100644 --- a/public/js/map.js +++ b/public/js/map.js @@ -182,6 +182,39 @@ class MapLayersButton { } } +// A passive zoom-level readout, sitting in the same stack as the buttons +// around it — the National Park Service's own control layout has one (the +// small numbered square next to their zoom buttons). Not a button: no +// click behavior, just a live display, so it's a plain div rather than a +//