X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5c0e96e0e0e99b3469c286f4bf77d4d0abf47c79..73eb8a5336ea14fa1ccc6de9442125b6475bf6bb:/app/assets/javascripts/routing_engines/mapquest.js diff --git a/app/assets/javascripts/routing_engines/mapquest.js b/app/assets/javascripts/routing_engines/mapquest.js index eb92893b3..dc854ccdc 100644 --- a/app/assets/javascripts/routing_engines/mapquest.js +++ b/app/assets/javascripts/routing_engines/mapquest.js @@ -40,7 +40,7 @@ MapQuestEngine.prototype.createConfig = function() { 18: 1 // straight fork }, getRoute: function(isFinal,points) { - var url="http://open.mapquestapi.com/directions/v2/route?key=Fmjtd%7Cluur290anu%2Crl%3Do5-908a0y"; + var url=document.location.protocol+"//open.mapquestapi.com/directions/v2/route?key=Fmjtd%7Cluur290anu%2Crl%3Do5-908a0y"; var from=points[0]; var to=points[points.length-1]; url+="&from="+from.join(','); url+="&to="+to.join(','); @@ -60,14 +60,27 @@ MapQuestEngine.prototype.createConfig = function() { } router.setPolyline(poly); - // data.shape.maneuverIndexes links turns to polyline positions - // data.legs[0].maneuvers is list of turns + // data.route.shape.maneuverIndexes links turns to polyline positions + // data.route.legs[0].maneuvers is list of turns var steps=[]; var mq=data.route.legs[0].maneuvers; for (var i=0; i