]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/routing_engines/graphhopper.js
Merge pull request #14 from tomhughes/routing
[rails.git] / app / assets / javascripts / routing_engines / graphhopper.js
index 9762c0fe4f0eb62c1cc25422d6479bb977979be0..5c10433c2d81244fdcd1456684ea1fd15848f3f8 100644 (file)
@@ -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: {