X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/ffeddd62a8c090c43074596f3095e21e5b7f3e5e..e35748567c431c3a092816bfbab0d2f5043284b1:/app/assets/javascripts/index/directions/graphhopper.js diff --git a/app/assets/javascripts/index/directions/graphhopper.js b/app/assets/javascripts/index/directions/graphhopper.js index 03edb0633..7a5d77d9b 100644 --- a/app/assets/javascripts/index/directions/graphhopper.js +++ b/app/assets/javascripts/index/directions/graphhopper.js @@ -49,12 +49,16 @@ function GraphHopperEngine(id, vehicleType) { instrText += instr.text; var latLng = line[instr.interval[0]]; var distInMeter = instr.distance; + var lineseg = []; + for (var j = instr.interval[0]; j <= instr.interval[1]; j++) { + lineseg.push({lat: line[j][0], lng: line[j][1]}); + } steps.push([ {lat: latLng[0], lng: latLng[1]}, instrCode, instrText, distInMeter, - [] + lineseg ]); // TODO does graphhopper map instructions onto line indices? }