TripService

interface TripService

Provides an interface to perform operations on a Trip. For example: planning a Trip, canceling a Trip and navigating a Trip.

Types

Link copied to clipboard
object Companion
Link copied to clipboard
interface TripPlanCompletionListener

Trip plan completion listener which receives the planned TripId and whether a TripPlanError occurred. The TripId can be null in case of errors.

Properties

Link copied to clipboard
abstract val activeTripId: TripId?

The activeTripId is the ID of the Trip currently being navigated. A Trip might have multiple routes (i.e. multiple paths to get from departure to destination).

Link copied to clipboard
abstract val activeTripPlan: TripPlan?

TripPlan contains the parameters for planning a Trip (i.e. departure and destination coordinate).

Functions

Link copied to clipboard
abstract suspend fun cancelActiveTrip()

Stops navigating the currently activeTrip.

Link copied to clipboard
abstract suspend fun planTripFromTo(departure: Place, destination: Place)

Plan a Trip from a departure to a destination.

Link copied to clipboard
abstract suspend fun planTripTo(destination: Place)

Plan a Trip from the current location to a destination.