X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7915a22cafafc1fcbd59d798ac1734ecfd083adc..eab2eeaa47b2aa8c7f52371f9bfdd60711a41fb6:/app/assets/javascripts/routing_engines/graphhopper.js?ds=sidebyside diff --git a/app/assets/javascripts/routing_engines/graphhopper.js b/app/assets/javascripts/routing_engines/graphhopper.js index 9762c0fe4..5c10433c2 100644 --- a/app/assets/javascripts/routing_engines/graphhopper.js +++ b/app/assets/javascripts/routing_engines/graphhopper.js @@ -44,7 +44,7 @@ GraphHopperEngine.prototype.createConfig = function() { var distInMeter = instr.distances[i]; steps.push([{lat: latlng[0], lng: latlng[1]}, instrCode, instrText, distInMeter]); } - router.setItinerary({steps: steps}); + router.setItinerary({ steps: steps, distance: data.route.distance, time: data.route['time']/1000 }); return true; }, GH_INSTR_MAP: {