(function () {
- function GraphHopperEngine(id, vehicleType) {
+ function GraphHopperEngine(modeId, vehicleType) {
const GH_INSTR_MAP = {
"-3": 7, // sharp left
"-2": 6, // left
}
return {
- id: id,
+ mode: modeId,
+ provider: "graphhopper",
creditline: "<a href=\"https://www.graphhopper.com/\" target=\"_blank\">GraphHopper</a>",
draggable: false,
};
}
- OSM.Directions.addEngine(new GraphHopperEngine("graphhopper_car", "car"), true);
- OSM.Directions.addEngine(new GraphHopperEngine("graphhopper_bicycle", "bike"), true);
- OSM.Directions.addEngine(new GraphHopperEngine("graphhopper_foot", "foot"), true);
+ OSM.Directions.addEngine(new GraphHopperEngine("car", "car"), true);
+ OSM.Directions.addEngine(new GraphHopperEngine("bicycle", "bike"), true);
+ OSM.Directions.addEngine(new GraphHopperEngine("foot", "foot"), true);
}());