]> git.openstreetmap.org Git - rails.git/commitdiff
turn_costs=true only for car
authorPeter <graphhopper@gmx.de>
Mon, 27 Jul 2020 11:04:52 +0000 (13:04 +0200)
committerGitHub <noreply@github.com>
Mon, 27 Jul 2020 11:04:52 +0000 (13:04 +0200)
I know there was a bit forth and back in #2695 and my last recommendation was to use turn_costs=true. This was not intended for bike and foot.

app/assets/javascripts/index/directions/graphhopper.js

index 829eb54a080c45eb5603ef9a36429f16d602702a..9a09c1009bea6d8cd19ec787e2a2f5532c77af86 100644 (file)
@@ -28,7 +28,7 @@ function GraphHopperEngine(id, vehicleType) {
           key: "LijBPDQGfu7Iiq80w3HzwB4RUDJbMbhs6BU0dEnn",
           elevation: false,
           instructions: true,
           key: "LijBPDQGfu7Iiq80w3HzwB4RUDJbMbhs6BU0dEnn",
           elevation: false,
           instructions: true,
-          turn_costs: true,
+          turn_costs: vehicleType === "car",
           point: points.map(function (p) { return p.lat + "," + p.lng; })
         },
         traditional: true,
           point: points.map(function (p) { return p.lat + "," + p.lng; })
         },
         traditional: true,