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
setAlternativeTrafficColor
Link copied to clipboard
fun Expected<RouteLineError, RouteSetValue>.setAlternativeTrafficColor(expression: Expression): Expected<RouteLineError, RouteSetValue>
Content copied to clipboard
fun Expected<RouteLineError, RouteSetValue>.setAlternativeTrafficColor(@ColorInt() color: Int): Expected<RouteLineError, RouteSetValue>
Content copied to clipboard
setNavigationRouteLines
Link copied to clipboard
suspend fun MapboxRouteLineApi.setNavigationRouteLines(newRoutes: List<NavigationRouteLine>): Expected<RouteLineError, RouteSetValue>
Content copied to clipboard
setNavigationRoutes
Link copied to clipboard
suspend fun MapboxRouteLineApi.setNavigationRoutes(newRoutes: List<NavigationRoute>): Expected<RouteLineError, RouteSetValue>
Content copied to clipboard
setPrimaryTrafficColor
Link copied to clipboard
fun Expected<RouteLineError, RouteSetValue>.setPrimaryTrafficColor(expression: Expression): Expected<RouteLineError, RouteSetValue>
Content copied to clipboard
fun Expected<RouteLineError, RouteSetValue>.setPrimaryTrafficColor(@ColorInt() color: Int): 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.