take next name for roundabout (not roundabout name)

This commit is contained in:
vshcherb 2013-08-23 16:11:52 +02:00
parent 9e43e5f9a2
commit 34d267ad56

View file

@ -246,8 +246,13 @@ public class RouteCalculationResult {
if(turn != null) {
RouteDirectionInfo info = new RouteDirectionInfo(s.getSegmentSpeed(), turn);
if(routeInd + 1< list.size()) {
RouteSegmentResult next = list.get(routeInd);
if (routeInd + 1 < list.size()) {
int lind = routeInd;
if(turn.isRoundAbout() && routeInd + 2 < list.size()) {
// take next name for roundabout (not roundabout name)
lind = routeInd + 1;
}
RouteSegmentResult next = list.get(lind);
info.setRef(next.getObject().getRef());
info.setStreetName(next.getObject().getName());
info.setDestinationName(next.getObject().getDestinationName());