-
Notifications
You must be signed in to change notification settings - Fork 307
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
Trip Planner - Error when planning "Bus only" trips #1014
Comments
Thanks @devinbraun! I'll take a look. |
I started looking at this. Interestingly, changing to "Bus Only" in Tampa uses this URL: ...which returns a: ...which then (likely due to #896) triggers a call to: ...which returns a: But if I change to "Bus Only" in San Diego, it looks like it gets some kind of response (TBD) which triggers an error in OBA Android when parsing it: ...and then OBA Android falls back to using the "Transit only" options: @devinbraun What version of OTP are you running? @sheldonabrown What version of OTP is Tampa running? Also, do you know what the current required request parameters are for OTP for limiting modes? In the OBA Android code we have the following comment on line 148 of
But it seems like this might be outdated from the newer versions of OTP that are being used. In the OBA UI these are all the mode options we currently offer (bikeshare is only shown if the region supports bikeshare):
|
@barbeau We are running OTP version 1.3.0 |
@barbeau I believe this API endpoint shows all of the possible travelOptions for San Diego http://realtime.sdmts.com:9090/otp/routers/default |
Here are the modes used in the opentripplanner-pojos library project:
Looking at the San Diego mode list, the supported modes are:
So there is an obvious mismatch between We need to determine if Sound Transit and Tampa also use |
From https://otp.prod.obahart.org/otp/routers/default, it looks like Tampa uses |
Looks like Sound Transit uses
|
It also looks like "Rail only" should use |
There was another issue here where the mode chosen in the "Additional trip options" wasn't being selected properly. It looks like this was broken when bikeshare was added. The code previously relied on matching the index of the spinner with the index of the mode array used internally. However, this was tweaked when bikeshare was added to dynamically remove the bikeshare mode options from regions that didn't support bikeshare. As a result the index chosen in the UI didn't match the index of the internal mode array (e.g., BUS ONLY in the UI always mapped to TRANSIT ONLY in the array for San Diego, which doesn't support bikeshare). |
I'm also changing behavior so that if max walk distance isn't set by the user the parameter is omitted from the API request. |
Summary:
When I plan a trip and select "Bus only" in Additional Trip Preferences, the trip plan doesn't seem to respect my preferences and they aren't saved when viewing the preferences after the trip plan was completed.
Leaving the max walking distance blank sends a value of 1.7976931348623157E308 as the max walking distance. This should probably default to a smaller value.
Steps to reproduce:
Create a trip plan and change the Travel By: to Bus Only. View the Additional Trip Preferences and Transit Only is selected, not Bus Only. The link to report a problem also shows this preference.
Delete the maximum walking distance value and plan a trip
Expected behavior:
Observed behavior:
Device and Android version:
Pixel 2, Android v10
Trip Planning Link (this one should have a Light Rail/Tram option as well as a few bus options):
http://realtime.sdmts.com:9090/otp/routers/default/plan?date=09-24-2019&mode=TRANSIT,WALK&arriveBy=false&wheelchair=false&optimize=QUICK&showIntermediateStops=true&fromPlace=32.7067,-117.150&toPlace=32.8314,-117.157&maxWalkDistance=1.7976931348623157E308&time=09:39AM
The text was updated successfully, but these errors were encountered: