Mapbox Route Line Api Extensions
object MapboxRouteLineApiExtensions
Content copied to clipboard
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>
Content copied to clipboard
findClosestRoute
Link copied to clipboard
suspend fun MapboxRouteLineApi.findClosestRoute(target: Point, mapboxMap: MapboxMap, padding: Float): Expected<RouteNotFound, ClosestRouteValue>
Content copied to clipboard
getRouteDrawData
Link copied to clipboard
suspend fun MapboxRouteLineApi.getRouteDrawData(): Expected<RouteLineError, RouteSetValue>
Content copied to clipboard
setRoutes
Link copied to clipboard
suspend fun MapboxRouteLineApi.setRoutes(newRoutes: List<RouteLine>): Expected<RouteLineError, RouteSetValue>
Content copied to clipboard
showRouteWithLegIndexHighlighted
Link copied to clipboard
suspend fun MapboxRouteLineApi.showRouteWithLegIndexHighlighted(legIndex: Int): Expected<RouteLineError, RouteLineUpdateValue>
Content copied to clipboard
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.