MapboxManeuverApi

class MapboxManeuverApi

Mapbox Maneuver Api allows you to request Maneuver instructions given a DirectionsRoute (to get all maneuvers for the provided route) or RouteProgress (to get remaining maneuvers for the provided route).

You can use the default MapboxManeuverView to render the results of the functions exposed by this API.

Constructors

MapboxManeuverApi
Link copied to clipboard
fun MapboxManeuverApi(formatter: DistanceFormatter, maneuverOptions: ManeuverOptions = ManeuverOptions.Builder().build(), routeShieldApi: MapboxRouteShieldApi = MapboxRouteShieldApi())
Mapbox Maneuver Api allows you to request Maneuver instructions given a DirectionsRoute (to get all maneuvers for the provided route) or RouteProgress (to get remaining maneuvers for the provided route).

Functions

cancel
Link copied to clipboard
fun cancel()
Invoke the function to cancel any job invoked through other APIs
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
getManeuvers
Link copied to clipboard
fun getManeuvers(routeProgress: RouteProgress): Expected<ManeuverError, List<Maneuver>>
Returns a list of Maneuvers which are wrappers on top of BannerInstructions that are in the provided route.
fun getManeuvers(route: DirectionsRoute, routeLegIndex: Int? = null): Expected<ManeuverError, List<Maneuver>>
Returns a list of Maneuvers which are wrappers on top of BannerInstructions that are in the provided route.
getRoadShields
Link copied to clipboard
fun getRoadShields(maneuvers: List<Maneuver>, callback: RoadShieldCallback)
Given a list of Maneuver the function requests legacy road shields (if available) using BannerComponents.imageBaseUrl associated in RoadShieldComponentNode.
fun getRoadShields(maneuvers: List<Maneuver>, shieldCallback: RouteShieldCallback)
Given a list of Maneuver the function requests legacy road shields (if available) using BannerComponents.imageBaseUrl associated in RoadShieldComponentNode.
fun getRoadShields(userId: String?, styleId: String?, accessToken: String?, maneuvers: List<Maneuver>, shieldCallback: RouteShieldCallback)
Given a list of Maneuver the function requests mapbox designed road shields (if available) using BannerComponents.mapboxShield associated in RoadShieldComponentNode.
hashCode
Link copied to clipboard
open fun hashCode(): Int
toString
Link copied to clipboard
open fun toString(): String