diff --git a/client/src/components/Planner/DayPlanSidebar.tsx b/client/src/components/Planner/DayPlanSidebar.tsx index df9ac5f6..002114fd 100644 --- a/client/src/components/Planner/DayPlanSidebar.tsx +++ b/client/src/components/Planner/DayPlanSidebar.tsx @@ -419,7 +419,7 @@ function useDayPlanSidebar(props: DayPlanSidebarProps) { const routeDayKey = routeDayIds.join(',') // Per-segment travel times shown as connectors between a day's located stops. - // Groups located places into runs (split at transports), one cached OSRM call per + // Groups located places into runs (split at transports), one cached API call per // run keyed by the start place's assignment id, plus the hotel bookend legs. Shares // RouteCalculator's cache with the map. Runs for every day in routeDayIds — one // selected day on desktop, each Route-toggled day on mobile (#1374). @@ -430,7 +430,7 @@ function useDayPlanSidebar(props: DayPlanSidebarProps) { const hotelName = (a: Accommodation) => (a as any).place_name || (a as any).reservation_title || '' // Pure per-day plan: the drive runs (each ≥2 waypoints) and which hotel bookend - // legs to draw. Side-effect free, so the async loop below only does OSRM I/O. + // legs to draw. Side-effect free, so the async loop below only does routing I/O. const planDay = (dayId: number) => { const merged = mergedItemsMap[dayId] || [] const runs: { id: number; lat: number; lng: number }[][] = [] @@ -500,7 +500,7 @@ function useDayPlanSidebar(props: DayPlanSidebarProps) { const legsByDay: Record> = {} const hotelByDay: Record = {} - // One cached OSRM call per waypoint pair; shares RouteCalculator's cache. + // One cached API call per waypoint pair; shares RouteCalculator's cache. const legBetween = async (a: { lat: number; lng: number }, b: { lat: number; lng: number }): Promise => { try { const r = await calculateRouteWithLegs([a, b], { signal: controller.signal, profile: routeProfile }) diff --git a/client/src/hooks/useRouteCalculation.ts b/client/src/hooks/useRouteCalculation.ts index b1d550ad..3bdcb84c 100644 --- a/client/src/hooks/useRouteCalculation.ts +++ b/client/src/hooks/useRouteCalculation.ts @@ -13,7 +13,7 @@ const NO_ACCOMMODATIONS: Accommodation[] = [] /** * Manages route calculation state for a selected day. Extracts geo-coded waypoints from - * day assignments, draws a straight-line route immediately, then upgrades it to real OSRM + * day assignments, draws a straight-line route immediately, then upgrades it to real * road geometry with per-segment durations. Aborts in-flight requests when the day changes. */ export function useRouteCalculation(tripStore: TripStoreState, selectedDayId: number | null, enabled: boolean = true, profile: 'driving' | 'walking' | 'cycling' = 'driving', accommodations: Accommodation[] = NO_ACCOMMODATIONS) { @@ -161,7 +161,7 @@ export function useRouteCalculation(tripStore: TripStoreState, selectedDayId: nu if (runsWithHotel.length === 0) { setRoute(null); setRouteSegments([]); return } // Draw straight lines immediately for snappiness, then upgrade to the real - // OSRM road geometry. + // road geometry. setRoute(straightLines()) const controller = new AbortController() @@ -176,7 +176,7 @@ export function useRouteCalculation(tripStore: TripStoreState, selectedDayId: nu allLegs.push(...r.legs) } catch (err) { if (err instanceof Error && err.name === 'AbortError') throw err - // OSRM failed for this run — fall back to a straight line, no times. + // Routing failed for this run — fall back to a straight line, no times. polylines.push(run.map(p => [p.lat, p.lng] as [number, number])) } } diff --git a/client/src/hooks/useTransportRoutes.ts b/client/src/hooks/useTransportRoutes.ts index 0516431e..c9fa1c9d 100644 --- a/client/src/hooks/useTransportRoutes.ts +++ b/client/src/hooks/useTransportRoutes.ts @@ -22,7 +22,7 @@ const ROAD_PROFILE: Record = { // Beyond this straight-line distance a car/taxi/bike (or even coach) booking is // almost always a data quirk or an inter-continental hop the road router can't -// resolve — keep the straight line and don't hammer the public OSRM demo. +// resolve — keep the straight line and don't hammer the routing API. const MAX_ROUTE_KM = 2000 function haversineKm(a: { lat: number; lng: number }, b: { lat: number; lng: number }): number { diff --git a/server/src/services/settingsService.ts b/server/src/services/settingsService.ts index d58f5349..f100d755 100644 --- a/server/src/services/settingsService.ts +++ b/server/src/services/settingsService.ts @@ -41,7 +41,7 @@ const VALID_VALUES: Partial> = { distance_unit: ['metric', 'imperial'], time_format: ['12h', '24h'], dark_mode: [true, false, 'light', 'dark', 'auto'], - map_provider: ['leaflet', 'mapbox-gl', 'maplibre-gl'], + map_provider: ['leaflet', 'mapbox-gl', 'maplibre-gl', 'amap'], llm_provider: ['local', 'openai', 'anthropic'], };