Click a hiking trail to see its name, color, network and distance
CI / check (push) Successful in 19s
CI / deploy (push) Successful in 12s

The Waymarked Trails raster overlay has no queryable features (just
pixels), so this answers "what trail is this" with a one-off Overpass
query on click instead: way(around:40m) finds candidate ways, then
rel(bw) walks backward to their parent route=hiking relations. Overpass
has permissive CORS, so this runs straight from the browser, no server
proxy needed — verified against a real KST route in the Tatras.

Route length isn't tagged directly, so it's summed from each member
way's own geometry (measure.js's existing haversine lineLength, now
exported and reused rather than duplicated). The colour tag is only
ever used as a CSS background after matching a strict hex/word regex —
untrusted free text otherwise.
This commit is contained in:
randy committed 2026-09-12 23:32:56 +02:00
1 parent 9c45e7275c
commit 6f1577f957
3 files changed
+107 -4

No files matched your search

+8
View File
@@ -1354,6 +1354,14 @@ html, body {
color: #fff;
}
.hiking-trail-popup__swatch {
flex-shrink: 0;
width: 14px;
height: 14px;
border-radius: 50%;
border: 1px solid rgba(255, 255, 255, 0.6);
}
.gpx-popup__header-icon {
flex-shrink: 0;
width: 18px;