1, // kMerge = 25;
11, // kRoundaboutEnter = 26;
12, // kRoundaboutExit = 27;
- 1, // kFerryEnter = 28;
+ 18, // kFerryEnter = 28;
1 // kFerryExit = 29;
];
getRoute: function (points, callback) {
return $.ajax({
- url: document.location.protocol + "//valhalla.mapzen.com/route",
+ url: document.location.protocol + OSM.MAPZEN_VALHALLA_URL,
data: {
api_key: OSM.MAPZEN_VALHALLA_KEY,
json: JSON.stringify({
callback(false, {
line: line,
steps: steps,
- distance: distance,
+ distance: distance * 1000,
time: time
});
} else {
callback(true);
}
+ },
+ error: function () {
+ callback(true);
}
});
}