From 149182f62009012447eadf66dd38aaa1b30090f9 Mon Sep 17 00:00:00 2001 From: Richard Fairhurst Date: Thu, 23 Jan 2014 22:29:09 +0000 Subject: [PATCH] Apparently 'final' is a reserved word in JS... --- app/assets/javascripts/routing.js.erb | 4 ++-- app/assets/javascripts/routing_engines/cloudmade_foot.js | 2 +- app/assets/javascripts/routing_engines/graphhopper_bicycle.js | 4 ++-- app/assets/javascripts/routing_engines/mapquest_bicycle.js | 2 +- app/assets/javascripts/routing_engines/osrm_car.js | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/routing.js.erb b/app/assets/javascripts/routing.js.erb index ce8ec93e8..7f18aa472 100644 --- a/app/assets/javascripts/routing.js.erb +++ b/app/assets/javascripts/routing.js.erb @@ -159,10 +159,10 @@ OSM.Routing=function(map,name,jqSearch) { // Route-fetching UI - r.requestRoute=function(final) { + r.requestRoute=function(isFinal) { if (r.route_from && r.route_to) { r.awaitingRoute=true; - r.chosenEngine.getRoute(final,[r.route_from,r.route_to]); + r.chosenEngine.getRoute(isFinal,[r.route_from,r.route_to]); // then, when the route has been fetched, it'll call the engine's gotRoute function } else if (r.route_from==false || r.route_to==false) { // we're waiting for a Nominatim response before we can request a route diff --git a/app/assets/javascripts/routing_engines/cloudmade_foot.js b/app/assets/javascripts/routing_engines/cloudmade_foot.js index 7aa147e5c..5193c6472 100644 --- a/app/assets/javascripts/routing_engines/cloudmade_foot.js +++ b/app/assets/javascripts/routing_engines/cloudmade_foot.js @@ -16,7 +16,7 @@ OSM.RoutingEngines.list.push({ "TSHR": 4, "TU": 5 }, // was half expecting to see TLDR in there - getRoute: function(final,points) { + getRoute: function(isFinal,points) { var url="http://routes.cloudmade.com/8ee2a50541944fb9bcedded5165f09d9/api/0.3/"; var p=[]; for (var i=0; i