Adds a Directions data layer: click A and B on the globe for a
street-following drive, walk or cycle route, draped on terrain and 3D tiles,
with one dot per maneuver and a FLY chip that rides the camera along it.
Needs no key, no geocoder and no microphone.
Routing already existed for voice ("route from A to B" → /api/route → OSRM
on the FOSSGIS servers) but was unreachable without an OpenAI key and a
Google geocoder, and returned geometry only. This layer is the keyless front
end to it.
Layer (src/data/directions.js): the row chips are the interface — DRIVE /
WALK / BIKE, SET A / SET B (arm the next globe click; Escape cancels), SWAP,
FLY, CLEAR. Chip writes go through the manager's setLayerParams → setParams
(mode and arm are state; swap/fly/clear are one-shot commands). The route is
a ClassificationType.BOTH ground polyline with the annotation renderer's
flowing-dash material (now exported), so it reads on the keyless terrain
globe and on 3D tiles alike. Clicking a maneuver dot opens a shared-host card
with the instruction, the leg after it and the next instruction. FLY hands
the geometry to flyRoute — the same cinematic as voice fly_route — after an
idempotent initCameraVerbs, which now accepts a missing target getter and
never clears an installed one. A route the router cannot find says so; no
straight line is ever drawn as a route.
Proxy (vite.config.js): /api/route accepts steps=1 and returns turn-by-turn
steps; the upstream is always asked for steps and the full response cached,
so the annotation engine (no steps) and Directions (steps) share one upstream
call per route. src/data/routeSteps.js phrases OSRM maneuver type / modifier
/ exit / road name into one plain-English sentence per decision and folds
"exit roundabout" into the roundabout step.
Manager: adds a public refreshLayerStats() so a layer whose state changes
outside a tick (click placement, routing) can repaint its row.
Credits: OSRM / FOSSGIS routing is now credited in the Data attribution
popover (voice routes used it uncredited).
Verified: 2,719 unit tests, 2,718 pass, 1 skipped (Node 24 allocation gate;
12 new); vite build green; headless Chrome against the dev server over
Helsinki, keyless: A and B placed by click, a 12-step drive, a 28-step walk
after switching mode, the step card on a dot (overlay diagnostics:
directions-step painted), FLY moved the camera, CLEAR reset the row; no
console errors. Docs: README, CHANGELOG, DATA_SOURCES (FOSSGIS routing
terms), docs/CURRENT-STATE.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>