Move Radar and Terrain shading into the Overlays panel
Both used to be their own separate sidebar icons; neither has anything to manage beyond on/off, same as Wikipedia already got its own Overlays entry for. Terrain shading is a plain checkbox item now. Radar keeps its scrub/forecast controls, but behind an explicit expand (clicking its name), separate from the checkbox — checking it on shouldn't force the details open, and expanding to scrub/check the forecast shouldn't also flip the layer on. Both controls now build their own <li> (RadarControl.mount(li), HillshadeControl.mount(li) — the latter moved into overlays.js entirely, it has no reason to live in map.js once it's not building its own sidebar icon) rather than a whole sidebar-item + flyout the way they used to. Also gave each Overlays item a leading icon: Wikipedia and Terrain shading reuse existing NPS pictograms (WIKI_ICON, and WILDERNESS_ICON newly exported from icons.js's forest entry — NPS has no dedicated mountain/terrain glyph, wilderness-22.svg is the closest honest match). Radar's is hand-drawn (a rain cloud) since NPS's set has nothing weather-related to reuse.
This commit is contained in:
1 parent
dce5fd87da
commit
a8d58abaca
6 files changed
+255
-170
No files matched your search
+9
-12
@@ -70,18 +70,15 @@
|
||||
<strong>Overlays</strong>
|
||||
<button type="button" class="basemap-panel__close" aria-label="Close">×</button>
|
||||
</div>
|
||||
<!-- Each item is a live layer refetched from its own source as the map
|
||||
moves, not a file to add/remove/reorder — a plain on/off list, no
|
||||
upload/new-folder actions the way Tracks & Points has. Wikipedia is
|
||||
the first; see public/js/overlays.js for how one of these works. -->
|
||||
<ul class="overlays-panel__list">
|
||||
<li class="overlays-panel__item">
|
||||
<label>
|
||||
<input type="checkbox" class="overlays-panel__wiki-toggle">
|
||||
<span>Wikipedia</span>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Each item is a live layer refetched/toggled from its own source as
|
||||
the map moves, not a file to add/remove/reorder — a plain on/off
|
||||
list, no upload/new-folder actions the way Tracks & Points has.
|
||||
Populated by OverlaysControl#mount (public/js/overlays.js), not
|
||||
here — Radar's item needs its own scrub/forecast markup built by
|
||||
RadarControl itself (radar.js), so all three items go through the
|
||||
same "control owns its own <li>" path rather than half static
|
||||
markup, half dynamic. -->
|
||||
<ul class="overlays-panel__list"></ul>
|
||||
</div>
|
||||
|
||||
<div id="livetrack-panel" class="basemap-panel" hidden>
|
||||
|
||||
Reference in new issue
Block a user