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
+20
-13
@@ -17,12 +17,6 @@ export const OVERLAYS_ICON = `
|
||||
<circle cx="15" cy="12" r="6"/>
|
||||
</svg>`;
|
||||
|
||||
export const HILLSHADE_ICON = `
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round" stroke-linecap="round">
|
||||
<path d="M2 18 9 7l3.5 5.5L15 9l7 9z"/>
|
||||
<path d="M2 18h20"/>
|
||||
</svg>`;
|
||||
|
||||
export const NOTE_PIN_ICON = `
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M12 21s7-7.58 7-12a7 7 0 0 0-14 0c0 4.42 7 12 7 12z"/>
|
||||
@@ -36,11 +30,6 @@ export const GPX_ICON = `
|
||||
<path d="M6.5 7.5C10 11 8 13 12 13s2 5 6.5 5"/>
|
||||
</svg>`;
|
||||
|
||||
export const RADAR_ICON = `
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round" stroke-linecap="round">
|
||||
<path d="M7 18a4 4 0 1 1 .7-7.94A5 5 0 0 1 17 9a4 4 0 0 1 0 8H7z"/>
|
||||
</svg>`;
|
||||
|
||||
export const GNSS_ICON = `
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round">
|
||||
<circle cx="12" cy="12" r="5.5"/>
|
||||
@@ -151,6 +140,25 @@ export const MAP_MARKER_ICON = `
|
||||
// tinted at render time, see gpx.js's _registerCategoryGlyphs) so only the
|
||||
// alpha shape matters, not the actual `currentColor` value.
|
||||
|
||||
// src/wilderness-22.svg — exported (unlike BICYCLE_TRAIL_ICON below, this
|
||||
// one's also used outside this file) as the Overlays panel's Terrain
|
||||
// shading glyph (overlays.js): the closest honest match in NPS's set for
|
||||
// "mountains/terrain" — it has no weather or elevation-specific pictogram.
|
||||
export const WILDERNESS_ICON = `
|
||||
<svg viewBox="0 0 22 22" fill="currentColor"><polygon points="18,18 13,15 17,15 13,11 16,11 12,7 15,7 12,4 14,4 11,0 8,4 10,4 7,7 10,7 6,11 9,11 5,15 9,15 4,18 10,18 10,22 12,22 12,18 "/></svg>`;
|
||||
|
||||
// Hand-drawn, not NPS-sourced — that set has no weather/precipitation
|
||||
// pictogram to reuse for the Overlays panel's Radar item, unlike Wikipedia
|
||||
// (WIKI_ICON) and Terrain shading (WILDERNESS_ICON) above.
|
||||
export const RADAR_CLOUD_ICON = `
|
||||
<svg viewBox="0 0 22 22" fill="currentColor">
|
||||
<path d="M17,10.1c-0.4-3-2.9-5.3-6-5.3c-2.5,0-4.7,1.5-5.6,3.8C3.4,8.9,1,11.1,1,13.9C1,16.7,3.3,19,6.1,19h10.3
|
||||
c2.5,0,4.6-2,4.6-4.5C21,12.2,19.3,10.4,17,10.1z"/>
|
||||
<rect x="6" y="20" width="1.6" height="2"/>
|
||||
<rect x="10.2" y="20" width="1.6" height="2"/>
|
||||
<rect x="14.4" y="20" width="1.6" height="2"/>
|
||||
</svg>`;
|
||||
|
||||
// src/bicycle-trail-22.svg — pulled out to its own constant since it's also
|
||||
// used unrasterized, inline, as PARK4NIGHT_TAGS.vtt below.
|
||||
const BICYCLE_TRAIL_ICON = `
|
||||
@@ -213,8 +221,7 @@ export const POI_ICONS = {
|
||||
</svg>`,
|
||||
|
||||
// src/wilderness-22.svg
|
||||
forest: `
|
||||
<svg viewBox="0 0 22 22" fill="currentColor"><polygon points="18,18 13,15 17,15 13,11 16,11 12,7 15,7 12,4 14,4 11,0 8,4 10,4 7,7 10,7 6,11 9,11 5,15 9,15 4,18 10,18 10,22 12,22 12,18 "/></svg>`,
|
||||
forest: WILDERNESS_ICON,
|
||||
|
||||
// src/bicycle-trail-22.svg
|
||||
sport_cycling: BICYCLE_TRAIL_ICON,
|
||||
|
||||
Reference in new issue
Block a user