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

Correct the display of flex legs #93

Merged
merged 3 commits into from
Jun 4, 2021

Conversation

flaktack
Copy link

@flaktack flaktack commented Jun 4, 2021

When creating itineraries for flex trips:

  • use the actual board / alight coordinates in leg.from / leg.to
  • correctly create new legs for mode transitions

This should fix the leg splitting mentioned in stadtnavi/digitransit-ui#571

…legs

For Locations the coordinate is the center point of the area, not the
actual place where the transition happens.
When traversing *Link edges `backMode = null`, which in most cases
doesn't cause problems. When splitting Flex states, there is only a
single `BUS` state, which the logic skipped.

The last-seen mode is tracked, instead of the previous mode, which
correct the check for mode changes.
@flaktack flaktack marked this pull request as ready for review June 4, 2021 14:28
@flaktack
Copy link
Author

flaktack commented Jun 4, 2021

I've manually tested, and it seems to work as expected. I've added a fix for another bug, wherein the leg.from and leg.to coordinates were not where the actual boarding / alighting were.

image

@leonardehrenfried
Copy link
Collaborator

Does this address this issue? stadtnavi/digitransit-ui#571

Or this one: #92

@flaktack
Copy link
Author

flaktack commented Jun 4, 2021

It addresses the first one (stadtnavi/digitransit-ui#571), #92 requires updating locations.json with a name property for each Feature. If that is done, then the API will reflect that.

@leonardehrenfried leonardehrenfried merged commit 6bf9597 into mfdz:dev-2.x Jun 4, 2021
@leonardehrenfried
Copy link
Collaborator

Clarification for @hbruch: this doesn't affect the routing but only it simply places the start/end location dot to where the passenger is actually picked up/dropped off.

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.

2 participants