Skip to content

Commit

Permalink
make use of new stops+stations layer
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Oct 11, 2024
1 parent 17598ad commit 21046bb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/components/map/default-map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 21046bb

Please sign in to comment.