fix(roadtrip): other ways come from the router that draws the leg, and a choice is saved once it holds

The picker of other ways asked OSRM with nothing avoided while the rail drives a trip
that avoids a road class through Valhalla, so the list had no current road, called a road
the rail was not on the fastest, and choosing it changed nothing. A choice was stored as
one via where the offer strayed furthest, without asking whether the router then drove
it: a point on a ferry was pulled to the pier and the drive went overland, and a way
weighed away from motorways kept the motorway after its one point. An OSRM answer standing
in for a Valhalla that did not respond was cached as the avoided road, unmarked.

The rail now hands out a router per leg with the leg's own mode, avoided classes and
engine, and its days carry the line of every leg. Offers come from that engine, and the
rail's own leg always heads the list as Current. A choice is pinned and proven against
that router with at most three pins before anything is written; a way it will not follow
is not saved and says why, with a hint when it crosses by ferry, and a leg that changed
meanwhile or a device offline writes nothing. The OSRM stand-in is filed under the plain
key only and flags the day as not avoided.
This commit is contained in:
Maurice
2026-09-23 09:04:58 +02:00
parent 6124e0b056
commit 53a422d22d
53 changed files with 2121 additions and 378 deletions
+5
View File
@@ -220,6 +220,11 @@ const roadtrip: TranslationStrings = {
'roadtrip.alt.slower': '{time} långsammare',
'roadtrip.alt.quicker': '{time} snabbare',
'roadtrip.alt.otherEngine': 'Tid från undvikandemotorn, inte huvudmotorn.',
'roadtrip.alt.notHeld': 'Bilresans ruttserver följer inte den här vägen, så den sparades inte.',
'roadtrip.alt.ferryNotHeld':
'Den här vägen går med färja. Lägg till färjan som transportbokning så följer resan den.',
'roadtrip.alt.legChanged': 'Sträckan ändrades medan vägen kontrollerades, så inget sparades.',
'roadtrip.alt.offline': 'Andra vägar sparas bara online. Anslut igen för att välja den här.',
'roadtrip.day': 'Dag {number}',
'roadtrip.quietDay.empty': 'Inga stopp än – släpp ett här',
'roadtrip.quietDay.one': 'Hittills bara {name} – släpp ett stopp här',