Trip
@CarProtocol
class Trip
Represents information about a trip including destinations, steps, and travel estimates.
This information data may be displayed in different places in the car such as the instrument cluster screens, heads-up display and floating navigation bar.
Floating navigation bar can show current navigating info in three templates including MapTemplate, RoutePreviewNavigationTemplate and PlaceListNavigationTemplate. The navigating steps can be added with the use of addStep. There are three navigation info showing in the floating nav bar including:
- The current road description get from
getCueof the currentStep, which gets from the first element ofgetSteps - The remaining distance of the current road get from
getRemainingDistanceof the first element ofgetStepTravelEstimates - The turn icon get from
getIconfrom theManeuverof the currentStep
Summary
Nested types |
|---|
class Trip.BuilderA builder of |
Public functions |
|
|---|---|
Boolean |
|
CarText? |
Returns the text that describes the current road. |
(Mutable)List<TravelEstimate!> |
Returns the list of |
(Mutable)List<Destination!> |
Returns the list of destinations for this trip. |
(Mutable)List<TravelEstimate!> |
Returns the list of |
(Mutable)List<Step!> |
getSteps()Returns the list of steps for the trip. |
Int |
hashCode() |
Boolean |
Returns whether the trip is in a loading state. |
String |
toString() |
Public functions
getCurrentRoad
fun getCurrentRoad(): CarText?
Returns the text that describes the current road.
| See also | |
|---|---|
setCurrentRoad |
getDestinationTravelEstimates
fun getDestinationTravelEstimates(): (Mutable)List<TravelEstimate!>
Returns the list of TravelEstimates for the Destinations in the trip.
| See also | |
|---|---|
addDestination |
getDestinations
fun getDestinations(): (Mutable)List<Destination!>
Returns the list of destinations for this trip.
| See also | |
|---|---|
addDestination |
getStepTravelEstimates
fun getStepTravelEstimates(): (Mutable)List<TravelEstimate!>
Returns the list of TravelEstimates for the Steps in the trip.
| See also | |
|---|---|
addDestination |
getSteps
fun getSteps(): (Mutable)List<Step!>
Returns the list of steps for the trip.
| See also | |
|---|---|
addStep |
isLoading
fun isLoading(): Boolean
Returns whether the trip is in a loading state.
| See also | |
|---|---|
setLoading |