]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions/mapquest.js
Fix missing semicolon warnings
[rails.git] / app / assets / javascripts / index / directions / mapquest.js
index 0daeaa139ed9e7214bcdd7e0fbe41e4e9aee0eb4..fbbc55a5f660f2c2e89721a4fcaf4b8c85b23725 100644 (file)
@@ -42,15 +42,16 @@ function MapQuestEngine(id, vehicleParam) {
       url += "&manMaps=false";
       url += "&shapeFormat=raw&generalize=0&unit=k";
 
-      $.ajax({
+      return $.ajax({
         url: url,
         success: function (data) {
           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;