CitymapperDirections

class CitymapperDirections

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
suspend fun loadRoute(handle: StoredRouteHandle): Route?
fun loadRoute(handle: StoredRouteHandle, callback: (Route?) -> Unit)

Retrieve a route previously stored with storeRoute. Only the previous 1 route is currently available

Link copied to clipboard
fun planBikeHireRoute(start: Coords, end: Coords, brandId: String, profiles: List<Profile> = listOf(Profile.Regular)): ApiCall<DirectionsResults, DirectionsError>
fun planBikeHireRoute(start: Coords, end: Coords, brandId: String, rideStartLocation: Coords? = null, profiles: List<Profile> = listOf(Profile.Regular)): ApiCall<DirectionsResults, DirectionsError>
Link copied to clipboard
fun planBikeRoutes(start: Coords, end: Coords, profiles: List<Profile> = listOf(Profile.Regular)): ApiCall<DirectionsResults, DirectionsError>
Link copied to clipboard
fun planMotorscooterHireRoute(start: Coords, end: Coords, brandId: String, rideStartLocation: Coords? = null): ApiCall<DirectionsResults, DirectionsError>
Link copied to clipboard
fun planScooterHireRoute(start: Coords, end: Coords, brandId: String, rideStartLocation: Coords? = null): ApiCall<DirectionsResults, DirectionsError>
Link copied to clipboard
fun planScooterRoute(start: Coords, end: Coords): ApiCall<DirectionsResults, DirectionsError>
Link copied to clipboard
fun planTransitRoutes(start: Coords, end: Coords, time: Date? = null, timeType: TimeType? = null): ApiCall<DirectionsResults, DirectionsError>
Link copied to clipboard
fun planWalkRoutes(start: Coords, end: Coords, profiles: List<Profile> = listOf(Profile.Fast)): ApiCall<DirectionsResults, DirectionsError>
Link copied to clipboard
fun storeRoute(route: Route): StoredRouteHandle

Store a Route for later retrieval. The Route will be (asynchronously) persisted to disk so can be retrieved after process death

Link copied to clipboard
fun updatesForRoute(route: Route, lifecycle: Lifecycle): StateFlow<Route>
Link copied to clipboard
fun updatesForRoutes(routes: List<Route>, lifecycle: Lifecycle): StateFlow<List<Route>>