]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/routing_engines/graphhopper_bicycle.js
Apparently 'final' is a reserved word in JS...
[rails.git] / app / assets / javascripts / routing_engines / graphhopper_bicycle.js
index 39c7bca595e9ccba42fef8b48a606f63fa9eeb46..7f7c83c80116c44a16a95e17a5d086a721bf03a0 100644 (file)
@@ -4,13 +4,13 @@ OSM.RoutingEngines.list.push({
     name: 'Bicycle (GraphHopper)',
     draggable: true,
     _hints: {},
-    getRoute: function(final, points) {
+    getRoute: function(isFinal, points) {
         var url = "http://graphhopper.com/routing/api/route?vehicle=bike&locale=en";
         for (var i = 0; i < points.length; i++) {
             var pair = points[i].join(',');
             url += "&point=" + pair;
         }
-        if (final)
+        if (isFinal)
             url += "&instructions=true";
         this.requestJSONP(url + "&type=jsonp&callback=");
     },