Skip to content

Commit 00fa6fa

Browse files
committed
Fix entrance sometimes not showing up.
1 parent b726f46 commit 00fa6fa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

application/src/main/java/org/opentripplanner/routing/algorithm/mapping/StatesToWalkStepsMapper.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ private void processState(State backState, State forwardState) {
186186
return;
187187
}
188188

189+
if (backState.getVertex() instanceof StationEntranceVertex stationEntranceVertex) {
190+
createAndSaveStationEntranceWalkStep(backState, forwardState, stationEntranceVertex);
191+
// Create a separate entrance step (do not return).
192+
}
193+
189194
// generate a step for getting off an elevator (all elevator narrative generation occurs
190195
// when alighting). We don't need to know what came before or will come after
191196
if (edge instanceof ElevatorAlightEdge elevatorAlightEdge) {
@@ -197,9 +202,6 @@ private void processState(State backState, State forwardState) {
197202
} else if (edge instanceof StreetEdge streetEdge && streetEdge.isStairs()) {
198203
createAndSaveStairsWalkStep(backState, forwardState, edge, geom);
199204
return;
200-
} else if (backState.getVertex() instanceof StationEntranceVertex stationEntranceVertex) {
201-
createAndSaveStationEntranceWalkStep(backState, forwardState, stationEntranceVertex);
202-
return;
203205
} else if (edge instanceof PathwayEdge pwe && pwe.signpostedAs().isPresent()) {
204206
createAndSaveStep(
205207
backState,

0 commit comments

Comments
 (0)