]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions/graphhopper.js
Clean up new direction form
[rails.git] / app / assets / javascripts / index / directions / graphhopper.js
index 729618f2d596441597482dea5f159f99f09357b4..b3194d16c17388240663b18e2a3dcc258fda3ac4 100644 (file)
@@ -1,5 +1,5 @@
 (function () {
 (function () {
-  function GraphHopperEngine(id, vehicleType) {
+  function GraphHopperEngine(modeId, vehicleType) {
     const GH_INSTR_MAP = {
       "-3": 7, // sharp left
       "-2": 6, // left
     const GH_INSTR_MAP = {
       "-3": 7, // sharp left
       "-2": 6, // left
@@ -47,7 +47,8 @@
     }
 
     return {
     }
 
     return {
-      id: id,
+      mode: modeId,
+      provider: "graphhopper",
       creditline: "<a href=\"https://www.graphhopper.com/\" target=\"_blank\">GraphHopper</a>",
       draggable: false,
 
       creditline: "<a href=\"https://www.graphhopper.com/\" target=\"_blank\">GraphHopper</a>",
       draggable: false,
 
@@ -73,7 +74,7 @@
     };
   }
 
     };
   }
 
-  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);
 }());
 }());