]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions/fossgis_osrm.js
Clean up new direction form
[rails.git] / app / assets / javascripts / index / directions / fossgis_osrm.js
index cd1731247f70c650e3bd49c5341f5f589fd92f4a..2332049befc14691a1843b4d6e78bb3804132122 100644 (file)
@@ -2,7 +2,7 @@
 // Doesn't yet support hints
 
 (function () {
-  function FOSSGISOSRMEngine(id, vehicleType) {
+  function FOSSGISOSRMEngine(modeId, vehicleType) {
     let cachedHints = [];
 
     function _processDirections(route) {
     }
 
     return {
-      id: id,
+      mode: modeId,
+      provider: "fossgis_osrm",
       creditline: "<a href=\"https://routing.openstreetmap.de/about.html\" target=\"_blank\">OSRM (FOSSGIS)</a>",
       draggable: true,
 
     };
   }
 
-  OSM.Directions.addEngine(new FOSSGISOSRMEngine("fossgis_osrm_car", "car"), true);
-  OSM.Directions.addEngine(new FOSSGISOSRMEngine("fossgis_osrm_bike", "bike"), true);
-  OSM.Directions.addEngine(new FOSSGISOSRMEngine("fossgis_osrm_foot", "foot"), true);
+  OSM.Directions.addEngine(new FOSSGISOSRMEngine("car", "car"), true);
+  OSM.Directions.addEngine(new FOSSGISOSRMEngine("bicycle", "bike"), true);
+  OSM.Directions.addEngine(new FOSSGISOSRMEngine("foot", "foot"), true);
 }());