]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions/fossgis_valhalla.js
Split engine id into mode and provider
[rails.git] / app / assets / javascripts / index / directions / fossgis_valhalla.js
index 41ad6a9725fcb332b3ec63030f36fad0f3c60343..11aa4470b4dfbf64d7204d3dd0aec78890e26168 100644 (file)
@@ -1,5 +1,5 @@
 (function () {
 (function () {
-  function FOSSGISValhallaEngine(id, costing) {
+  function FOSSGISValhallaEngine(modeId, costing) {
     const INSTR_MAP = [
       0, // kNone = 0;
       8, // kStart = 1;
     const INSTR_MAP = [
       0, // kNone = 0;
       8, // kStart = 1;
@@ -82,7 +82,8 @@
     }
 
     return {
     }
 
     return {
-      id: id,
+      mode: modeId,
+      provider: "fossgis_valhalla",
       creditline:
       "<a href='https://gis-ops.com/global-open-valhalla-server-online/' target='_blank'>Valhalla (FOSSGIS)</a>",
       draggable: false,
       creditline:
       "<a href='https://gis-ops.com/global-open-valhalla-server-online/' target='_blank'>Valhalla (FOSSGIS)</a>",
       draggable: false,
     };
   }
 
     };
   }
 
-  OSM.Directions.addEngine(new FOSSGISValhallaEngine("fossgis_valhalla_car", "auto"), true);
-  OSM.Directions.addEngine(new FOSSGISValhallaEngine("fossgis_valhalla_bicycle", "bicycle"), true);
-  OSM.Directions.addEngine(new FOSSGISValhallaEngine("fossgis_valhalla_foot", "pedestrian"), true);
+  OSM.Directions.addEngine(new FOSSGISValhallaEngine("car", "auto"), true);
+  OSM.Directions.addEngine(new FOSSGISValhallaEngine("bicycle", "bicycle"), true);
+  OSM.Directions.addEngine(new FOSSGISValhallaEngine("foot", "pedestrian"), true);
 }());
 }());