MapboxRouteLineApiExtensions

object 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

clearRouteLine
Link copied to clipboard
suspend fun MapboxRouteLineApi.clearRouteLine(): Expected<RouteLineError, RouteLineClearValue>
Clears the route line data.
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
findClosestRoute
Link copied to clipboard
suspend fun MapboxRouteLineApi.findClosestRoute(target: Point, mapboxMap: MapboxMap, padding: Float): Expected<RouteNotFound, ClosestRouteValue>
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.
getRouteDrawData
Link copied to clipboard
suspend fun MapboxRouteLineApi.getRouteDrawData(): Expected<RouteLineError, RouteSetValue>
hashCode
Link copied to clipboard
open fun hashCode(): Int
setRoutes
Link copied to clipboard
suspend fun MapboxRouteLineApi.setRoutes(newRoutes: List<RouteLine>): Expected<RouteLineError, RouteSetValue>
Sets the routes that will be operated on.
showRouteWithLegIndexHighlighted
Link copied to clipboard
suspend fun MapboxRouteLineApi.showRouteWithLegIndexHighlighted(legIndex: Int): Expected<RouteLineError, RouteLineUpdateValue>
If successful this method returns a RouteLineUpdateValue that when rendered will display the route line with the route leg indicated by the provided leg index highlighted.
toString
Link copied to clipboard
open fun toString(): String