Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add combined stops/stations layer #789

Conversation

miles-grant-ibigroup
Copy link
Collaborator

Requires a few hacks to get click handling working, but allows us to render stations/stops seamless as one layer

Copy link
Contributor

@amy-corson-ibigroup amy-corson-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only issue I'm seeing is this is not playing well with the entity prefix. Are you anticipating fixing that in OTP-RR or is there a way to not pass it to stations?
image

endpoint: string,
setLocation?: (location: MapLocationActionArg) => void,
setViewedStop?: (stop: Stop) => void,
stopsWhitelist?: string[],
configCompanies?: ConfiguredCompany[],
getEntityPrefix?: (entity: Stop | Station) => JSX.Element
): JSX.Element[] => {
const fakeOtpUiLayerIndex = layers.findIndex(l=>l.type === STOPS_AND_STATIONS_TYPE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment here explaining why we're calling this fakeOtpUiLayerIndex

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a real layer! The others are all linked to actual maplibre layers

@miles-grant-ibigroup
Copy link
Collaborator Author

Bug you mention is fixed here! opentripplanner/otp-react-redux#1284

Copy link
Contributor

@amy-corson-ibigroup amy-corson-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OTP-RR draft looks great thanks for the explanation!

Copy link
Contributor

@josh-willis-arcadis josh-willis-arcadis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!

@miles-grant-ibigroup miles-grant-ibigroup merged commit 5bfe262 into opentripplanner:master Oct 18, 2024
2 checks passed
@miles-grant-ibigroup miles-grant-ibigroup deleted the stops-and-stations-layer branch October 18, 2024 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants