From 2dfafc1924ee39b62144f50cff60f06235c5cd27 Mon Sep 17 00:00:00 2001 From: Peter Date: Tue, 13 May 2025 11:21:21 +0200 Subject: [PATCH] Update graphhopper.js --- app/assets/javascripts/index/directions/graphhopper.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/index/directions/graphhopper.js b/app/assets/javascripts/index/directions/graphhopper.js index dd79a4671..18c1225f9 100644 --- a/app/assets/javascripts/index/directions/graphhopper.js +++ b/app/assets/javascripts/index/directions/graphhopper.js @@ -47,15 +47,13 @@ draggable: false, getRoute: function (points, signal) { - // GraphHopper Directions API documentation - // https://graphhopper.com/api/1/docs/routing/ + // GraphHopper Directions API documentation https://docs.graphhopper.com const query = new URLSearchParams({ - vehicle: vehicleType, + profile: vehicleType, locale: OSM.i18n.locale, - key: "LijBPDQGfu7Iiq80w3HzwB4RUDJbMbhs6BU0dEnn", + key: "7cb4eb19-e0f4-40a3-a5e0-f2c039366f32", elevation: false, - instructions: true, - turn_costs: vehicleType === "car" + instructions: true }); points.forEach(p => query.append("point", p.lat + "," + p.lng)); return fetch(OSM.GRAPHHOPPER_URL + "?" + query, { signal }) -- 2.39.5