X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3ef8024b1d33f0de6227a26967ba78ef85672a94..73eb8a5336ea14fa1ccc6de9442125b6475bf6bb:/app/assets/javascripts/routing_engines/graphhopper.js diff --git a/app/assets/javascripts/routing_engines/graphhopper.js b/app/assets/javascripts/routing_engines/graphhopper.js index 5c10433c2..6d83e26e2 100644 --- a/app/assets/javascripts/routing_engines/graphhopper.js +++ b/app/assets/javascripts/routing_engines/graphhopper.js @@ -42,7 +42,7 @@ GraphHopperEngine.prototype.createConfig = function() { instrText += instr.descriptions[i]; var latlng = instr.latLngs[i]; var distInMeter = instr.distances[i]; - steps.push([{lat: latlng[0], lng: latlng[1]}, instrCode, instrText, distInMeter]); + steps.push([{lat: latlng[0], lng: latlng[1]}, instrCode, instrText, distInMeter, []]); // TODO does graphhopper map instructions onto line indices? } router.setItinerary({ steps: steps, distance: data.route.distance, time: data.route['time']/1000 }); return true; @@ -59,5 +59,5 @@ GraphHopperEngine.prototype.createConfig = function() { }; }; -OSM.RoutingEngines.list.push(new GraphHopperEngine("Bicycle", "vehicle=bike").createConfig()); -OSM.RoutingEngines.list.push(new GraphHopperEngine("Foot", "vehicle=foot").createConfig()); +OSM.RoutingEngines.add(false, new GraphHopperEngine("Bicycle", "vehicle=bike").createConfig()); +OSM.RoutingEngines.add(false, new GraphHopperEngine("Foot", "vehicle=foot").createConfig());