MKTransitTrip, MKTransitLine, MKTransitLineVariation

Originator:amorya
Number:rdar://30396804 Date Originated:07-Feb-2017 02:42 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:10.2
Classification:Enhancement Reproducible:Always
 
I'd like to propose MKTransitTrip, MKTransitLine and MKTransitLineVariation.

MKTransitLine is a public transport route, such as "the number 12 bus in Coventry", or "the Euston to Blackpool train". It has:

- A list of service providers (the companies that operate the route, e.g. "Travel West Midlands")
- A route name
- A route short code, if appropriate (e.g. "12" for the number 12 bus; the train example would not have a short code.)
- A transit mode (i.e. an MKDirectionsTransportSubtype, see radar 30395156)
- A set of variations (see below).

MKTransitLineVariation is a version of the transit line. In the number 12 bus example, it might have two variations: the "Coventry centre to University of Warwick" variation, and the "University of Warwick to Coventry centre" variation. Some lines might have more than two variations, if there are versions that stop short or if there are multiple destinations.

Each MKTransitLineVariation has:

- A (directional) polyline
- An ordered list of MKMapItems that represent the transit stops along the line. 
- The name of this variation.
- Optionally, a route direction (either "inbound" or "outbound"), or a compass direction ("northbound", "westbound" etc).

MKTransitTrip represents one journey that a particular vehicle makes along its line variation. For example, the number 12 bus that leaves its origin on Tue 17th September 2018, 15:30. Each one has:

- An MKTransitLineVariation (optional — some trips, especially national trains, don't run along predefined lines).
- A time of departure from origin
- A headsign (the text that is written on the front of the bus displaying its destination)
- A list of MKTransitCallingPoints. (I'll explain these in a future radar; essentially they're combinations of MKMapItems representing stops, and times.)
- If this TransitTrip represents a train that can split/join en-route (such as "travel in the front 4 carriages for Ramsgate, the back 4 carriages for Margate), then it contains sub-trips for each of the branches.

(This radar is part of a series of radars describing the API improvements to MapKit that I would need in order to power my app, UK Transport, solely using MapKit's APIs.)

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!