"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: "<a href=\"https://www.graphhopper.com/\" target=\"_blank\">Graphhopper</a>",
+ creditline: "<a href=\"https://www.graphhopper.com/\" target=\"_blank\">GraphHopper</a>",
draggable: false,
getRoute: function (points, callback) {
return $.ajax({
url: OSM.GRAPHHOPPER_URL,
data: {
- "vehicle": vehicleType,
- "locale": I18n.currentLocale(),
- "key": "LijBPDQGfu7Iiq80w3HzwB4RUDJbMbhs6BU0dEnn",
- "elevation": false,
- "instructions": true,
- "turn_costs": 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",