From: Christian Beiwinkel Date: Thu, 22 Dec 2022 16:39:50 +0000 (+0100) Subject: consistent naming of FOSSGIS routers X-Git-Tag: live~897^2 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/1e332721531b9b3baa1a8795a718cdeffdb2bd40 consistent naming of FOSSGIS routers --- diff --git a/app/assets/javascripts/index/directions/osrm.js b/app/assets/javascripts/index/directions/fossgis_osrm.js similarity index 96% rename from app/assets/javascripts/index/directions/osrm.js rename to app/assets/javascripts/index/directions/fossgis_osrm.js index 280e66a80..3989ff2b6 100644 --- a/app/assets/javascripts/index/directions/osrm.js +++ b/app/assets/javascripts/index/directions/fossgis_osrm.js @@ -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); diff --git a/app/assets/javascripts/index/directions/valhalla.js b/app/assets/javascripts/index/directions/fossgis_valhalla.js similarity index 89% rename from app/assets/javascripts/index/directions/valhalla.js rename to app/assets/javascripts/index/directions/fossgis_valhalla.js index 2b946b783..c897a3b16 100644 --- a/app/assets/javascripts/index/directions/valhalla.js +++ b/app/assets/javascripts/index/directions/fossgis_valhalla.js @@ -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); diff --git a/config/locales/en.yml b/config/locales/en.yml index ba2add26f..0efe22cb2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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"