X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/1596713871672cc319b0d68b51a3698cc6bf0972..7bf86b7c4eb7c11beb114eb9a7b398ff4d48d495:/app/assets/javascripts/index/directions/mapquest.js diff --git a/app/assets/javascripts/index/directions/mapquest.js b/app/assets/javascripts/index/directions/mapquest.js index 0daeaa139..6b24fb3bc 100644 --- a/app/assets/javascripts/index/directions/mapquest.js +++ b/app/assets/javascripts/index/directions/mapquest.js @@ -48,9 +48,10 @@ function MapQuestEngine(id, vehicleParam) { if (data.info.statuscode !== 0) return callback(true); + var i; var line = []; var shape = data.route.shape.shapePoints; - for (var i = 0; i < shape.length; i += 2) { + for (i = 0; i < shape.length; i += 2) { line.push(L.latLng(shape[i], shape[i + 1])); } @@ -58,7 +59,7 @@ function MapQuestEngine(id, vehicleParam) { // data.route.legs[0].maneuvers is list of turns var steps = []; var mq = data.route.legs[0].maneuvers; - for (var i = 0; i < mq.length; i++) { + for (i = 0; i < mq.length; i++) { var s = mq[i]; var d; var linesegstart, linesegend, lineseg;