getRoadShields

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.

If you do not wish to download all of the shields at once, make sure to pass in only a list of maneuvers that you'd like download the road shields.

The function is safe to be called repeatably, all the results are cached in-memory and requests are managed to avoid duplicating network bandwidth usage.

The function returns maps of String to RoadShield or String to RoadShieldError in RoadShieldCallback.onRoadShields and can be used when displaying PrimaryManeuver, SecondaryManeuver and SubManeuver.

See also

Parameters

maneuvers

list of maneuvers

callback

invoked with appropriate result


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.

If you do not wish to download all of the shields at once, make sure to pass in only a list of maneuvers that you'd like download the road shields.

The function is safe to be called repeatably, all the results are cached in-memory and requests are managed to avoid duplicating network bandwidth usage.

The function returns list of either RouteShieldError or RouteShieldResult in RouteShieldCallback.onRoadShields and can be used when displaying PrimaryManeuver, SecondaryManeuver and SubManeuver.

See also

Parameters

maneuvers

list of maneuvers

shieldCallback

invoked with appropriate result


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. If for any reason the API fails to download the mapbox designed shields, it fallbacks to use legacy BannerComponents.imageBaseUrl if available.

If you do not wish to download all of the shields at once, make sure to pass in only a list of maneuvers that you'd like download the road shields.

The function is safe to be called repeatably, all the results are cached in-memory and requests are managed to avoid duplicating network bandwidth usage.

The function returns list of either RouteShieldError or RouteShieldResult in RouteShieldCallback.onRoadShields and can be used when displaying PrimaryManeuver, SecondaryManeuver and SubManeuver.

See also

Parameters

maneuvers

list of maneuvers

shieldCallback

invoked with appropriate result