Vehicle profiles (Car, Camper, ...), avoid tolls/motorways, per-country vignette and toll km for a route
CI / check (push) Successful in 19s
CI / deploy (push) Successful in 17s

This commit is contained in:
randy committed 2026-11-14 21:20:23 +01:00
1 parent 58ca871662
commit 69aa284e36
8 files changed
+328 -80

No files matched your search

+15 -3
View File
@@ -139,9 +139,21 @@ serving swaps the tiles in, and a truck route with dimensions comes back.
up to 3.5 t it's `auto` with the vehicle's height and width, because a
camper shouldn't be kept off roads closed to lorries (`hgv=no`). Above
3.5 t it's `truck` with every dimension.
* Vehicle profile: height, width, length, weight in `data/vehicle.json`
(`GET`/`PUT /api/vehicle`), one for now, edited in the route panel.
The default is a camper: 3.0 m, 2.3 m, 7 m, 3.5 t.
* Vehicle profiles in `data/vehicles.json` (`GET`/`PUT /api/vehicles`,
saving needs a login): a name plus optional height, width, length,
weight (missing: no limit). Defaults: Car (no limits) and Camper
(3.0 m, 2.3 m, 7 m, 3.5 t; an older single `vehicle.json` becomes the
camper). The route panel picks one per browser (localStorage) and sends
its id with `/api/route` and `/api/isochrone`; Edit shows the fields.
* Avoid tolls / motorways (`"avoid": {"tolls": true, "highways": true}`)
sets Valhalla's `use_tolls` / `use_highways` to 0 for the whole route.
Per country isn't possible in one Valhalla request.
* Vignettes and tolls: `/api/route` adds `countries`, the km, motorway km
and toll km per country, from `/trace_attributes` (edge_walk on each
leg's shape). The panel lists vignette countries (fixed list in
route.js) with motorway km, other countries with toll km. In vignette
countries every motorway km counts, since OSM doesn't tag those as toll
reliably.
* Route panel (`public/js/route.js`): while it's open, a map click adds a
point; markers drag; Reverse, Clear. The route is drawn with distance,
time and directions. "Save to library" stores it as a `route` item in