MapboxRouteLineApiExtensions
Extension functions for MapboxRouteLineApi calls that are implemented as callbacks. This offers an alternative to those callbacks by providing Kotlin oriented suspend functions.
Functions
Link copied to clipboard
suspend fun MapboxRouteLineApi.clearRouteLine(): Expected<RouteLineError, RouteLineClearValue>
Content copied to clipboard
Clears the route line data.
Link copied to clipboard
suspend fun MapboxRouteLineApi.findClosestRoute( target: Point, mapboxMap: MapboxMap, padding: Float): Expected<RouteNotFound, ClosestRouteValue>
Content copied to clipboard
The map will be queried for a route line feature at the target point or a bounding box centered at the target point with a padding value determining the box's size. If a route feature is found the index of that route in this class's route collection is returned. The primary route is given precedence if more than one route is found.
Link copied to clipboard
suspend fun MapboxRouteLineApi.getRouteDrawData(): Expected<RouteLineError, RouteSetValue>
Content copied to clipboard
Link copied to clipboard
suspend fun MapboxRouteLineApi.setNavigationRouteLines(newRoutes: List<NavigationRouteLine>): Expected<RouteLineError, RouteSetValue>
Content copied to clipboard
suspend fun MapboxRouteLineApi.setNavigationRouteLines(newRoutes: List<NavigationRouteLine>, activeLegIndex: Int): Expected<RouteLineError, RouteSetValue>
Content copied to clipboard
suspend fun MapboxRouteLineApi.setNavigationRouteLines(newRoutes: List<NavigationRouteLine>, alternativeRoutesMetadata: List<AlternativeRouteMetadata>): Expected<RouteLineError, RouteSetValue>
Content copied to clipboard
suspend fun MapboxRouteLineApi.setNavigationRouteLines( newRoutes: List<NavigationRouteLine>, activeLegIndex: Int, alternativeRoutesMetadata: List<AlternativeRouteMetadata>): Expected<RouteLineError, RouteSetValue>
Content copied to clipboard
Sets the routes that will be operated on.
Link copied to clipboard
suspend fun MapboxRouteLineApi.setNavigationRoutes(newRoutes: List<NavigationRoute>): Expected<RouteLineError, RouteSetValue>
Content copied to clipboard
suspend fun MapboxRouteLineApi.setNavigationRoutes(newRoutes: List<NavigationRoute>, activeLegIndex: Int): Expected<RouteLineError, RouteSetValue>
Content copied to clipboard
suspend fun MapboxRouteLineApi.setNavigationRoutes(newRoutes: List<NavigationRoute>, alternativeRoutesMetadata: List<AlternativeRouteMetadata>): Expected<RouteLineError, RouteSetValue>
Content copied to clipboard
suspend fun MapboxRouteLineApi.setNavigationRoutes( newRoutes: List<NavigationRoute>, activeLegIndex: Int, alternativeRoutesMetadata: List<AlternativeRouteMetadata>): Expected<RouteLineError, RouteSetValue>
Content copied to clipboard
Sets the routes that will be operated on.