Fix latLng from GraphHopper engine
authorNicolas Cornu <ncornu@aldebaran.com>
Thu, 16 Feb 2017 19:59:04 +0000 (20:59 +0100)
committerNicolas Cornu <ncornu@aldebaran.com>
Thu, 16 Feb 2017 19:59:42 +0000 (20:59 +0100)
latLng is an array and not a latLng object

app/assets/javascripts/index/directions/graphhopper.js

index 88a9c15c1215b00ae19ba6a7373eb88dff1efd7c..03edb0633996fc17eef933e68c86093b536c26a2 100644 (file)
@@ -50,7 +50,7 @@ function GraphHopperEngine(id, vehicleType) {
             var latLng = line[instr.interval[0]];
             var distInMeter = instr.distance;
             steps.push([
-              {lat: latLng.lat, lng: latLng.lng},
+              {lat: latLng[0], lng: latLng[1]},
               instrCode,
               instrText,
               distInMeter,