From 9c27ea6670cf715b129aeeb277a74fcabae50af8 Mon Sep 17 00:00:00 2001 From: Hannes <23156476+marecabo@users.noreply.github.com> Date: Sat, 4 Oct 2025 14:07:33 +0200 Subject: [PATCH] fix(graphhopper): Rename vehicle param to profile for routing requests Thsi fixes Street Snapping when editing shapes in the GTFS editor. When I tried it with a local Graphhopper instance before, I got the error message "bad request: profile parameter required" from the routing request. At some point, Graphhopper switched from a `vehicle` parameter to `profile`, see https://github.com/graphhopper/graphhopper/pull/1934. --- lib/scenario-editor/utils/valhalla.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/scenario-editor/utils/valhalla.js b/lib/scenario-editor/utils/valhalla.js index 408a8cec5..5b8992234 100644 --- a/lib/scenario-editor/utils/valhalla.js +++ b/lib/scenario-editor/utils/valhalla.js @@ -204,7 +204,7 @@ export async function getSegment ( /** * Call GraphHopper routing service with lat/lng coordinates. * - * Example URL: https://graphhopper.com/api/1/route?point=49.932707,11.588051&point=50.3404,11.64705&vehicle=car&debug=true&&type=json + * Example URL: https://graphhopper.com/api/1/route?point=49.932707,11.588051&point=50.3404,11.64705&profile=car&debug=true&&type=json */ export function routeWithGraphHopper (points: Array, avoidMotorways?: boolean): ?Promise { if (points.length < 2) { @@ -257,7 +257,7 @@ export function routeWithGraphHopper (points: Array, avoidMotorways?: bo const params = { key: graphHopperKey, - vehicle: 'car', + profile: 'car', debug: true, type: 'json' } @@ -277,7 +277,7 @@ export function routeWithGraphHopper (points: Array, avoidMotorways?: bo }, debug: params.debug, points: points.map(p => [p.lng, p.lat]), - profile: params.vehicle + profile: params.profile }), headers: { 'Content-Type': 'application/json'