From 21046bb4a06c97b2ffe95ff1d14ecf7166c7f2df Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Fri, 11 Oct 2024 11:34:48 -0400 Subject: [PATCH] make use of new stops+stations layer --- lib/components/map/default-map.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/components/map/default-map.tsx b/lib/components/map/default-map.tsx index b2e7b899f..5548f8171 100644 --- a/lib/components/map/default-map.tsx +++ b/lib/components/map/default-map.tsx @@ -158,7 +158,12 @@ class DefaultMap extends Component { // Generate operator logos to pass through OTP tile layer to map-popup getEntityPrefix = (entity) => { - const stopId = entity.gtfsId + // In the case that we are dealing with a station, use the first stop of the station + const firstStopOfStationId = entity.stops + ? JSON.parse(entity.stops)[0] + : false + + const stopId = firstStopOfStationId || entity.gtfsId this.props.findStopTimesForStop({ date: getCurrentDate(), onlyRequestForOperators: true,