Fix last road name

This commit is contained in:
vshcherb 2013-08-23 16:16:56 +02:00
parent 34d267ad56
commit 12c873189b

View file

@ -246,9 +246,9 @@ public class RouteCalculationResult {
if(turn != null) {
RouteDirectionInfo info = new RouteDirectionInfo(s.getSegmentSpeed(), turn);
if (routeInd + 1 < list.size()) {
if (routeInd < list.size()) {
int lind = routeInd;
if(turn.isRoundAbout() && routeInd + 2 < list.size()) {
if(turn.isRoundAbout() && routeInd + 1 < list.size()) {
// take next name for roundabout (not roundabout name)
lind = routeInd + 1;
}