Give trail pages an outdoor map
Mirror to forge / mirror (push) Canceled after 0s
Validate / validate (push) Canceled after 0s
Validate / site (push) Canceled after 0s
Validate / deploy (push) Canceled after 0s

Trail maps now open on an outdoor style of our own, drawn on the same
OpenFreeMap tiles: hill shading and contour lines from the public
Terrain Tiles, woods, water, footpaths, and peaks with their heights.
Heights and contours follow the visitor's units. A switch on the map
goes back to the plain map and is remembered.

The home page's overview map is unchanged. If the elevation tiles or
the contour script fail, the map still loads without them.

The security policy allows the one elevation-tile path. The contour
add-on (maplibre-contour 0.1.1) is vendored with its licence, and the
elevation data is credited on the map, under it and in the footer.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-15 13:26:45 -07:00
1 parent 540a3220be
commit ad2223f427
15 files changed
+994 -27

No files matched your search

+4 -1
View File
@@ -1,5 +1,6 @@
/* Runs in <head>, before first paint: marks that JavaScript runs, and applies the
reader's saved theme and length order. Saved by app.js (footer switches). */
reader's saved theme, length order and base map. Saved by app.js (the footer
switches, and the Outdoor / Plain switch on a trail map). */
(function () {
'use strict';
var root = document.documentElement;
@@ -7,7 +8,9 @@
try {
var theme = localStorage.getItem('lh-theme');
var units = localStorage.getItem('lh-units');
var basemap = localStorage.getItem('lh-basemap');
if (theme === 'light' || theme === 'dark') root.dataset.theme = theme;
if (units === 'km') root.dataset.units = 'km'; /* anything else, an old 'mi' included, is miles */
if (basemap === 'plain') root.dataset.basemap = 'plain'; /* anything else is the outdoor map */
} catch (e) { /* storage blocked: defaults apply */ }
})();