From: Marwin Hochfelsner <50826859+hlfan@users.noreply.github.com> Date: Sun, 6 Apr 2025 16:06:43 +0000 (+0200) Subject: Remove unneeded coordinate reformatting X-Git-Tag: live~67^2~5 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/95685629965360f0901cb5f4755424abfb60e478?ds=inline;hp=-c Remove unneeded coordinate reformatting --- 95685629965360f0901cb5f4755424abfb60e478 diff --git a/app/assets/javascripts/index/directions/fossgis_osrm.js b/app/assets/javascripts/index/directions/fossgis_osrm.js index c7ea197b6..b8001f1d2 100644 --- a/app/assets/javascripts/index/directions/fossgis_osrm.js +++ b/app/assets/javascripts/index/directions/fossgis_osrm.js @@ -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 = "" + step.destinations + ""; diff --git a/app/assets/javascripts/index/directions/fossgis_valhalla.js b/app/assets/javascripts/index/directions/fossgis_valhalla.js index cc230f348..c160e69b1 100644 --- a/app/assets/javascripts/index/directions/fossgis_valhalla.js +++ b/app/assets/javascripts/index/directions/fossgis_valhalla.js @@ -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], diff --git a/app/assets/javascripts/index/directions/graphhopper.js b/app/assets/javascripts/index/directions/graphhopper.js index e1e8a9861..325dcabcd 100644 --- a/app/assets/javascripts/index/directions/graphhopper.js +++ b/app/assets/javascripts/index/directions/graphhopper.js @@ -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],