Transit Routing

Transit Routes are routes calculated by using CoreRouter with the the RouteOptions transport mode set to PUBLIC_TRANSPORT. With the transit routing feature, you can calculate transit routes by using known online timetable information.

The TransitRouteElement Class

Transit route elements, which are route element objects specific to public transit, can be retrieved from the getTransitElement() method in the RouteElement class.

Online Timetables

By default, transit routes and times are calculated according to static estimations of each leg of the trip. However, it is possible for the HERE SDK to query the online timetable data that is available from municipalities. This type of transit routing can be performed automatically without additional coding effort, but the following conditions must be fulfilled:

Your application must have an active data connection, and CoreRouter must be set to Connectivity.DEFAULT or Connectivity.ONLINE.

The route must be between two endpoints—an origin and a destination. Multiple endpoints are not supported.

You are required to display the source attribution, retrieved through the Route.getTransitRouteSourceAttribution() method, somewhere near the route results.

This type of calculation only returns a maximum of ten route results, even if the limit set in the RouteOptions.setRouteCount(int) exceeds it.

Note: The following route options are ignored in this route calculation mode:

setTransitMinimumChangeTime(int)

setTransitWalkTimeMultiplier(int)

In addition, the setTransitMaximumChanges(int) option is supported in the primary route result, but the maximum number of changes is capped at 10.

Note: Contractual limitations exist for Online Timetable coverage in Paris, France and Germany. See Service Support to contact us for more details.