X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6db326aa1f084a062a3b658876bc01bf650f5702..bc70cae711fb6947233d6a750cb33f115aa7a01b:/app/assets/javascripts/index/directions/graphhopper.js?ds=sidebyside
diff --git a/app/assets/javascripts/index/directions/graphhopper.js b/app/assets/javascripts/index/directions/graphhopper.js
index 6bd430c06..e72f6d75f 100644
--- a/app/assets/javascripts/index/directions/graphhopper.js
+++ b/app/assets/javascripts/index/directions/graphhopper.js
@@ -9,12 +9,17 @@ function GraphHopperEngine(id, vehicleType) {
"3": 3, // sharp right
"4": 14, // finish reached
"5": 14, // via reached
- "6": 10 // roundabout
+ "6": 10, // roundabout
+ "-7": 19, // keep left
+ "7": 18, // keep right
+ "-98": 4, // unknown direction u-turn
+ "-8": 4, // left u-turn
+ "8": 4 // right u-turn
};
return {
id: id,
- creditline: "Graphhopper",
+ creditline: "GraphHopper",
draggable: false,
getRoute: function (points, callback) {
@@ -23,13 +28,13 @@ function GraphHopperEngine(id, vehicleType) {
return $.ajax({
url: OSM.GRAPHHOPPER_URL,
data: {
- "vehicle": vehicleType,
- "locale": I18n.currentLocale(),
- "key": "LijBPDQGfu7Iiq80w3HzwB4RUDJbMbhs6BU0dEnn",
- "ch.disable": vehicleType === "car",
- "elevation": false,
- "instructions": true,
- "point": points.map(function (p) { return p.lat + "," + p.lng; })
+ vehicle: vehicleType,
+ locale: I18n.currentLocale(),
+ key: "LijBPDQGfu7Iiq80w3HzwB4RUDJbMbhs6BU0dEnn",
+ elevation: false,
+ instructions: true,
+ turn_costs: vehicleType === "car",
+ point: points.map(function (p) { return p.lat + "," + p.lng; })
},
traditional: true,
dataType: "json",