Fix cloudmade ETA

This commit is contained in:
Victor Shcherb 2012-09-09 19:38:26 +02:00
parent 2cc38a6c35
commit 3fbc2b001d

View file

@ -451,6 +451,7 @@ public class RouteProvider {
RouteDirectionInfo last = directions.get(directions.size() - 1); RouteDirectionInfo last = directions.get(directions.size() - 1);
// update speed using time and idstance // update speed using time and idstance
last.setAverageSpeed((distanceToEnd[last.routePointOffset] - distanceToEnd[offset])/last.getAverageSpeed()); 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 // save time as a speed because we don't know distance of the route segment
float avgSpeed = time; float avgSpeed = time;