]> git.openstreetmap.org Git - rails.git/commitdiff
Tuen on turn restriction support for graphhopper
authorSimon Poole <simon@poole.ch>
Wed, 8 Jul 2020 14:04:11 +0000 (16:04 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Jul 2020 14:04:11 +0000 (16:04 +0200)
No way of actually testing if this works, but it is based on https://docs.graphhopper.com/#operation/getRoute/parameters/point and https://www.graphhopper.com/blog/2020/07/08/turn-restriction-support-for-graphhoppers-directions-api/

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

index 6bd430c06021612ccb086a8b58b6c14f97a9d6af..0a593f59bf9119286ebd1510a52f8189f4e78f68 100644 (file)
@@ -29,6 +29,7 @@ function GraphHopperEngine(id, vehicleType) {
           "ch.disable": vehicleType === "car",
           "elevation": false,
           "instructions": true,
+          "turn_costs": true,
           "point": points.map(function (p) { return p.lat + "," + p.lng; })
         },
         traditional: true,