mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-23 23:46:35 +00:00
feat(tours): show the known SAC grades along a hike (MAP-03)
A hike in the planner, being edited or viewed as an import, now has an "SAC grades" card. Switched on, it asks the router which OpenStreetMap ways lie under the line (matched on foot, every grade of path open) and the server reads their sac_scale through the Overpass mirrors, the same trail-grades read the mountain bike grades use. The grades are drawn along the route on the planner map in one ramp of a single hue, T1 to T6, and listed by share and length; a row draws its class alone. Each row names its source in a tooltip: the SAC hiking scale and the sac_scale value OpenStreetMap wrote. What is not known stays unknown and says why, never T1: a way without a grade, a grade that names no single step (handed on as written), a stretch with no way clearly under the tour's line, or a way that could not be asked about. For imported tracks and stretches drawn by hand a matched way only counts where it keeps within 25 m of the tour's own line, so the original line is kept and nothing is guessed. The router's own reading of the scale is not asked for, since it may be normalised. The routing limit of a planned hike sits apart as a setting with its own badge, and a known step above it is marked. Nothing about the tour, its places or its days changes; switched off, the map is as it was. No regional colour categories and no grade derived from slope, height or trail markings.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/* ============================================================================
|
||||
Hikes on the planner map and in its cards (MAP-03): the SAC hiking grades
|
||||
OpenStreetMap gives the ways along a hike, T1 to T6. Global, since the 2D,
|
||||
GL and 3D maps and the planner's cards all read the tokens.
|
||||
========================================================================== */
|
||||
|
||||
/* One ramp of a single hue, from light to deep as the steps grow harder, so
|
||||
the order reads at a glance. It is deliberately no trail marking colour
|
||||
(yellow, white and red, white and blue) and no regional blue, red or black
|
||||
category: the scale is shown as the SAC scale and nothing else. A way
|
||||
without a known grade takes the grey of the unknown (--bike-surface-unknown),
|
||||
never a step. In the dark theme the ramp turns round, so the harder steps
|
||||
stay the ones that stand out. */
|
||||
:root {
|
||||
--hike-sac-t1: #c4b5fd;
|
||||
--hike-sac-t2: #a78bfa;
|
||||
--hike-sac-t3: #8b5cf6;
|
||||
--hike-sac-t4: #7c3aed;
|
||||
--hike-sac-t5: #6d28d9;
|
||||
--hike-sac-t6: #4c1d95;
|
||||
}
|
||||
|
||||
.dark {
|
||||
--hike-sac-t1: #5b21b6;
|
||||
--hike-sac-t2: #6d28d9;
|
||||
--hike-sac-t3: #7c3aed;
|
||||
--hike-sac-t4: #8b5cf6;
|
||||
--hike-sac-t5: #a78bfa;
|
||||
--hike-sac-t6: #ddd6fe;
|
||||
}
|
||||
Reference in New Issue
Block a user