From 3fbc2b001dbc4f85ce07c59fff5fe3ebbca7cf16 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 9 Sep 2012 19:38:26 +0200 Subject: [PATCH] Fix cloudmade ETA --- OsmAnd/src/net/osmand/plus/routing/RouteProvider.java | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index 5e2abce3c1..f712deccff 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -451,6 +451,7 @@ public class RouteProvider { RouteDirectionInfo last = directions.get(directions.size() - 1); // update speed using time and idstance last.setAverageSpeed((distanceToEnd[last.routePointOffset] - distanceToEnd[offset])/last.getAverageSpeed()); + last.distance = (int) (distanceToEnd[last.routePointOffset] - distanceToEnd[offset]); } // save time as a speed because we don't know distance of the route segment float avgSpeed = time;