]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions/mapzen.js
User ferry icon for kFerryEnter with Mapzen routing
[rails.git] / app / assets / javascripts / index / directions / mapzen.js
index 3c2aaff8ce18f14fec04e5a0b94cdd101e4b46c4..73643ba465faa613da1426b50bbd85df0bc57967 100644 (file)
@@ -28,7 +28,7 @@ function MapzenEngine(id, costing) {
     1,  // kMerge = 25;
     11, // kRoundaboutEnter = 26;
     12, // kRoundaboutExit = 27;
-    1 // kFerryEnter = 28;
+    18, // kFerryEnter = 28;
     1   // kFerryExit = 29;
   ];
 
@@ -87,12 +87,15 @@ function MapzenEngine(id, costing) {
             callback(false, {
               line: line,
               steps: steps,
-              distance: distance,
+              distance: distance * 1000,
               time: time
             });
           } else {
             callback(true);
           }
+        },
+        error: function () {
+          callback(true);
         }
       });
     }