Apparently 'final' is a reserved word in JS...
This commit is contained in:
parent
7c13b43f31
commit
149182f620
5 changed files with 8 additions and 8 deletions
|
@ -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=");
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue