]> git.openstreetmap.org Git - rails.git/commitdiff
Remove unneeded coordinate reformatting
authorMarwin Hochfelsner <50826859+hlfan@users.noreply.github.com>
Sun, 6 Apr 2025 16:06:43 +0000 (18:06 +0200)
committerMarwin Hochfelsner <50826859+hlfan@users.noreply.github.com>
Sun, 6 Apr 2025 17:44:38 +0000 (19:44 +0200)
app/assets/javascripts/index/directions/fossgis_osrm.js
app/assets/javascripts/index/directions/fossgis_valhalla.js
app/assets/javascripts/index/directions/graphhopper.js

index c7ea197b6bc09a61fdd4cfa22e8b3644a50f853f..b8001f1d21d7dc9e2a65881af38d74485f297222 100644 (file)
@@ -94,7 +94,7 @@
         const instrPrefix = "javascripts.directions.instructions.";
         let template = instrPrefix + INSTRUCTION_TEMPLATE[maneuver_id];
 
-        const step_geometry = L.PolylineUtil.decode(step.geometry, { precision: 5 }).map(L.latLng);
+        const step_geometry = L.PolylineUtil.decode(step.geometry, { precision: 5 });
 
         let instText;
         const destinations = "<b>" + step.destinations + "</b>";
index cc230f34899b1554b1b6ce38455729e4920daa25..c160e69b1959d80e6a245a8efe21db4b3483ba85 100644 (file)
@@ -47,8 +47,7 @@
 
       const steps = leg.maneuvers.map(manoeuvre => {
         const lineseg = line
-          .slice(manoeuvre.begin_shape_index, manoeuvre.end_shape_index + 1)
-          .map(([lat, lng]) => ({ lat, lng }));
+          .slice(manoeuvre.begin_shape_index, manoeuvre.end_shape_index + 1);
         return [
           lineseg[0],
           INSTR_MAP[manoeuvre.type],
index e1e8a986195dca70681c1be324298947a455c904..325dcabcd621e42ed26bd57e1af2197513870d28 100644 (file)
@@ -23,8 +23,7 @@
 
       const steps = path.instructions.map(function (instr) {
         const lineseg = line
-          .slice(instr.interval[0], instr.interval[1] + 1)
-          .map(([lat, lng]) => ({ lat, lng }));
+          .slice(instr.interval[0], instr.interval[1] + 1);
         return [
           lineseg[0],
           GH_INSTR_MAP[instr.sign],