]> git.openstreetmap.org Git - rails.git/commitdiff
consistent naming of FOSSGIS routers
authorChristian Beiwinkel <chrstn.bwnkl@gmail.com>
Thu, 22 Dec 2022 16:39:50 +0000 (17:39 +0100)
committerChristian Beiwinkel <chrstn.bwnkl@gmail.com>
Thu, 22 Dec 2022 16:39:50 +0000 (17:39 +0100)
app/assets/javascripts/index/directions/fossgis_osrm.js [moved from app/assets/javascripts/index/directions/osrm.js with 96% similarity]
app/assets/javascripts/index/directions/fossgis_valhalla.js [moved from app/assets/javascripts/index/directions/valhalla.js with 89% similarity]
config/locales/en.yml

similarity index 96%
rename from app/assets/javascripts/index/directions/osrm.js
rename to app/assets/javascripts/index/directions/fossgis_osrm.js
index 280e66a80f0b1ffe175b5ba46f0d4e65a5c2b84d..3989ff2b6441c1f3e87c9725ce16b8f11a40cdb7 100644 (file)
@@ -1,7 +1,7 @@
 // OSRM engine
 // Doesn't yet support hints
 
-function OSRMEngine(id, vehicleType) {
+function FOSSGISOSRMEngine(id, vehicleType) {
   var cachedHints = [];
 
   return {
@@ -207,6 +207,6 @@ function OSRMEngine(id, vehicleType) {
   };
 }
 
-OSM.Directions.addEngine(new OSRMEngine("fossgis_osrm_car", "car"), true);
-OSM.Directions.addEngine(new OSRMEngine("fossgis_osrm_bike", "bike"), true);
-OSM.Directions.addEngine(new OSRMEngine("fossgis_osrm_foot", "foot"), 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);
similarity index 89%
rename from app/assets/javascripts/index/directions/valhalla.js
rename to app/assets/javascripts/index/directions/fossgis_valhalla.js
index 2b946b783119eaa1f674a29bb30281b0eca1cd90..c897a3b16943c84ebb8c8b783a728b97c6763efa 100644 (file)
@@ -1,4 +1,4 @@
-function ValhallaEngine(id, costing) {
+function FOSSGISValhallaEngine(id, costing) {
   var INSTR_MAP = [
     0, // kNone = 0;
     8, // kStart = 1;
@@ -107,6 +107,6 @@ function ValhallaEngine(id, costing) {
   };
 }
 
-  OSM.Directions.addEngine(new ValhallaEngine("valhalla_car", "auto"), true);
-  OSM.Directions.addEngine(new ValhallaEngine("valhalla_bicycle", "bicycle"), true);
-  OSM.Directions.addEngine(new ValhallaEngine("valhalla_foot", "pedestrian"), true);
+  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);
index ba2add26f9b7ff04fd69953f109eed1f65b14a7c..0efe22cb20a92e5884f6b693050ed36f2507bbef 100644 (file)
@@ -2927,9 +2927,9 @@ en:
         graphhopper_bicycle: "Bicycle (GraphHopper)"
         graphhopper_car: "Car (GraphHopper)"
         graphhopper_foot: "Foot (GraphHopper)"
-        valhalla_bicycle: "Bicycle (Valhalla)"
-        valhalla_car: "Car (Valhalla)"
-        valhalla_foot: "Foot (Valhalla)"
+        fossgis_valhalla_bicycle: "Bicycle (Valhalla)"
+        fossgis_valhalla_car: "Car (Valhalla)"
+        fossgis_valhalla_foot: "Foot (Valhalla)"
       descend: "Descend"
       directions: "Directions"
       distance: "Distance"