VRS: assign LocationType.ANY to generic line destination/direction

This commit is contained in:
Andreas Schildbach 2023-02-03 17:56:06 +01:00
parent 226143e8c6
commit 93251e0d93

View file

@ -487,7 +487,7 @@ public class VrsProvider extends AbstractNetworkProvider {
position = new Position(postName); position = new Position(postName);
} }
} }
final Location destination = new Location(LocationType.STATION, null /* id */, null /* place */, final Location destination = new Location(LocationType.ANY, null /* id */, null /* place */,
lineObj.getString("direction")); lineObj.getString("direction"));
final LineDestination lineDestination = new LineDestination(line, destination); final LineDestination lineDestination = new LineDestination(line, destination);
@ -818,7 +818,7 @@ public class VrsProvider extends AbstractNetworkProvider {
segmentDestination, arrivalPlanned, points, (int) distance)); segmentDestination, arrivalPlanned, points, (int) distance));
} else if (type.equals("publicTransport")) { } else if (type.equals("publicTransport")) {
legs.add(new Trip.Public(line, direction != null legs.add(new Trip.Public(line, direction != null
? new Location(LocationType.STATION, null /* id */, null /* place */, direction) : null, ? new Location(LocationType.ANY, null /* id */, null /* place */, direction) : null,
new Stop(segmentOrigin, true /* departure */, departurePlanned, departurePredicted, new Stop(segmentOrigin, true /* departure */, departurePlanned, departurePredicted,
segmentOriginPosition, segmentOriginPosition), segmentOriginPosition, segmentOriginPosition),
new Stop(segmentDestination, false /* departure */, arrivalPlanned, arrivalPredicted, new Stop(segmentDestination, false /* departure */, arrivalPlanned, arrivalPredicted,