From: Nicolas Cornu Date: Thu, 16 Feb 2017 19:59:04 +0000 (+0100) Subject: Fix latLng from GraphHopper engine X-Git-Tag: live~3573 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/ffeddd62a8c090c43074596f3095e21e5b7f3e5e?hp=80ff26802fb4d7e749ec99cdcbdf14d6f2492d75 Fix latLng from GraphHopper engine latLng is an array and not a latLng object --- diff --git a/app/assets/javascripts/index/directions/graphhopper.js b/app/assets/javascripts/index/directions/graphhopper.js index 88a9c15c1..03edb0633 100644 --- a/app/assets/javascripts/index/directions/graphhopper.js +++ b/app/assets/javascripts/index/directions/graphhopper.js @@ -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,