Open aaronbrethorst opened 7 years ago
For reference with OBA Android - there is a system architecture diagram for OBA Android that includes the trip planning feature at https://github.com/OneBusAway/onebusaway-android/blob/master/SYSTEM_ARCHITECTURE.md#add-trip-planning-andor-bike-share-optional
We use an OpenTripPlanner server (http://www.opentripplanner.org/) for the trip planning server. OBA Android client makes REST API requests with origin/destination, and OTP server responds with route plan.
All of the OBA Android code that implements this communication with the OTP server is available in the https://github.com/OneBusAway/onebusaway-android/tree/master/onebusaway-android/src/main/java/org/onebusaway/android/directions package.
Main trip planning UI elements are TripPlanActivity
and TripPlanFragment
.
OTP servers are currently set up for the Tampa and Puget Sound regions (which you can see in the otpBaseUrl
elements in the Regions API - http://regions.onebusaway.org/regions-v3.json) if you want to test
Note that there is an OTP iOS app at: https://github.com/opentripplanner/OpenTripPlanner-iOS
The biggest limitation for using this project is that the open-source license is unknown. I opened an issue in Nov 2014 and followed up through 2016, but the organization that wrote the code, OpenPlans, no longer exists and no one associated with that organization was able to provide/obtain licensing info.
The most recent commit to that repo was also Dec. 27, 2012, so the code is very dated in terms of both OTP server and iOS development practices.
An update - we've implemented a Kotlin multiplatform library for making API requests and parsing responses for OpenTripPlanner v2 (OTP2) servers here, which includes an iOS module (Swift package) that's intended for use by OBAKit: https://github.com/CUTR-at-USF/opentripplanner-client-library
OBA Android will eventually be transitioned to use this library as well (long story short - we needed to build an OTP2 client for a desktop application, and figured why not build it for iOS and Android at the same time? 😅 🤷).
The main caveat right now, though, is that all OTP servers in OBA regions are all running OTP1, not OTP2. So:
Placeholder task for building an OTP module for the iOS app. This needs to get broken down into granular and tractable work items.
From Sean: https://github.com/OneBusAway/onebusaway-iphone/issues/618#issuecomment-298036471