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

+2
View File
@@ -21,6 +21,7 @@
</script>
<script src="/vendor/pmtiles/pmtiles.js"></script>
<script src="/vendor/protomaps-themes-base/protomaps-themes-base.js"></script>
<script src="/vendor/maplibre-contour/maplibre-contour.min.js"></script>
<%# Vendored libs above don't change between deploys, so they're left
unversioned; app.js's own modules do, and map.js statically imports
them by bare path — an import map remaps those paths to a versioned
@@ -31,6 +32,7 @@
{
"imports": {
"/js/auth.js": "/js/auth.js?v=<%= ASSET_VERSION %>",
"/js/contour.js": "/js/contour.js?v=<%= ASSET_VERSION %>",
"/js/dem.js": "/js/dem.js?v=<%= ASSET_VERSION %>",
"/js/gnss.js": "/js/gnss.js?v=<%= ASSET_VERSION %>",
"/js/gpx.js": "/js/gpx.js?v=<%= ASSET_VERSION %>",