mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-21 14:21:46 +00:00
feat(planner): real road routes (OSRM) with travel-time connectors (#1060)
* feat(planner): real road routes (OSRM) with travel-time connectors Replace the straight-line "as the crow flies" route with real OSRM road geometry (FOSSGIS routed-car/-foot) and an Apple-Maps style render (blue casing under a lighter core) on both the Leaflet and Mapbox GL maps. Routes are off by default and toggled per session, with a driving/walking mode switch in the day footer. Each day shows per-segment travel time/distance connectors between places, computed from the OSRM legs and split at transport bookings. Also redesigns the day header for visual consistency: vertical number+weather capsule, name with a divider before the date, subtle hotel/rental pills that stay on one line, and a hover-revealed 2x2 action square (edit / add transport / add note / collapse). Drops the Google Maps button. * test(planner): update route hook tests for calculateRouteWithLegs
This commit is contained in:
@@ -237,8 +237,19 @@ export interface RouteSegment {
|
||||
mid: [number, number]
|
||||
from: [number, number]
|
||||
to: [number, number]
|
||||
distance: number
|
||||
duration: number
|
||||
walkingText: string
|
||||
drivingText: string
|
||||
distanceText: string
|
||||
durationText?: string
|
||||
}
|
||||
|
||||
export interface RouteWithLegs {
|
||||
coordinates: [number, number][]
|
||||
distance: number
|
||||
duration: number
|
||||
legs: RouteSegment[]
|
||||
}
|
||||
|
||||
export interface RouteResult {
|
||||
|
||||
Reference in New Issue
Block a user