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({
locations: points.map(function (p) { return { lat: p.lat, lon: p.lng }; }),
costing: costing,
directions_options: {
- units: "km",
- language: I18n.currentLocale()
+ units: "km"
}
})
},