Add contour lines to the Overlays panel via maplibre-contour
CI / check (push) Successful in 18s
CI / deploy (push) Successful in 12s

5th Overlays item, generated client-side from the same online Terrarium
DEM tiles Terrain shading already fetches (no offline fallback — the
plugin's DemSource has no public hook to route through the pmtiles://
protocol the offline basemap uses, so this quietly renders nothing
without a network, same as Radar/the Wikipedia layer).

A plain vector source/layer under MapLibre's own tile lifecycle, no
manual refetch-on-move code needed. Thresholds are the plugin's own
generic starting point, not yet tuned against real terrain. Labels
skipped for now (font-name matching across the online/offline styles'
own glyph sets adds real risk for a nice-to-have, not the actual ask).
This commit is contained in:
randy committed 2026-09-11 00:12:32 +02:00
1 parent b4a1c6c0cc
commit fba8ca10a2
7 files changed
+140 -2

No files matched your search

+12
View File
@@ -193,6 +193,18 @@ export const TERRAIN_SHADOW_ICON = `
<polygon points="0,19 6,9 9,13 13,6 22,19"/>
</svg>`;
// Hand-drawn, not NPS-sourced — no contour-line pictogram in that set
// either. Concentric rings via fill-rule evenodd, same solid-glyph
// convention as WILDERNESS_ICON/RADAR_CLOUD_ICON/TERRAIN_SHADOW_ICON above —
// used as the Overlays panel's Contour lines glyph (contour.js).
export const CONTOUR_ICON = `
<svg viewBox="0 0 22 22" fill="currentColor" fill-rule="evenodd">
<path d="M21,11 A10,10 0 1,0 1,11 A10,10 0 1,0 21,11 Z
M18.5,11 A7.5,7.5 0 1,0 3.5,11 A7.5,7.5 0 1,0 18.5,11 Z
M16,11 A5,5 0 1,0 6,11 A5,5 0 1,0 16,11 Z
M13.5,11 A2.5,2.5 0 1,0 8.5,11 A2.5,2.5 0 1,0 13.5,11 Z"/>
</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 = `