Navi destination
State
Coordinates
Declaration
getCoordinates()
Example
val state:NaviDestination.State
assertTrue(state.coordinates.value?.latitude == 52.520008)
assertTrue(state.coordinates.value?.longitude == 13.404954)
// Coordinates are 52.520008:13.404954
Destination name
Declaration
getDestinationName()
Discussion
Destination name
Example
val state:NaviDestination.State
assertTrue(state.destinationName.value == "Berlin")
// Destination name is 'Berlin'
Data slots free
Declaration
getDataSlotsFree()
Discussion
Remaining number of POI data slots available.
Example
val state:NaviDestination.State
assertTrue(state.dataSlotsFree.value == 14)
// 14 available POI data slots
Data slots max
Declaration
getDataSlotsMax()
Discussion
Maximum number of POI data slots.
Example
val state:NaviDestination.State
assertTrue(state.dataSlotsMax.value == 30)
// Maximum number of POI data slots is 30
Arrival duration
Declaration
getArrivalDuration()
Discussion
Remaining time until reaching the destination.
Example
val state:NaviDestination.State
assertTrue(state.arrivalDuration.value?.value == 2.6)
assertTrue(state.arrivalDuration.value?.unit == Duration.Unit.HOURS)
// Remaining time to destination is 2.6h
Distance to destination
Declaration
getDistanceToDestination()
Discussion
Remaining distance to reach the destination.
Example
val state:NaviDestination.State
assertTrue(state.distanceToDestination.value?.value == 1337.0)
assertTrue(state.distanceToDestination.value?.unit == Length.Unit.KILOMETERS)
// Remaining distance to destination is 1337.0km