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

Route type comparator does not consider GTFS route types in long route response #130

Closed
landonreed opened this issue Feb 18, 2020 · 1 comment · Fixed by #131
Closed
Assignees

Comments

@landonreed
Copy link
Member

landonreed commented Feb 18, 2020

OTP has two different response types in the transit index for routes: long and short.

The short response (which the route type comparator in otp-rr) currently handles contains a Route@mode field, which maps to the OTP transit mode enum values (e.g., BUS and RAIL). However, in the long response from OTP, the mode field is dropped in favor of route_type, which uses the int-based route types from GTFS. So, when a route is clicked in the otp-rr route viewer, the route object is replaced with the long response, and it drops the mode field. Originally, I thought the route was just disappearing from the list, but in fact it was dropping to the bottom of the list (in accordance with the route type comparator logic -- default to 9999).

case 'FERRY':
return 5
case 'CABLE_CAR':
return 6
case 'FUNICULAR':
return 7
case 'BUS':
return 8
default:
return 9999
}
}

@evansiroky
Copy link
Contributor

🎉 This issue has been resolved in version 0.13.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants