getRoadComponentsShields
fun getRoadComponentsShields(roadComponents: List<RoadComponent>, userId: String?, styleId: String?, callback: RouteShieldCallback)
The function requests mapbox designed road shields (if available) using RoadComponent.shield's MapboxShield.baseUrl for the current road. If for any reason the API is unable to download the shield, it falls back to download and return the legacy shield using RoadComponent.imageBaseUrl. Returns error otherwise.
The function returns list of RouteShieldResult or RouteShieldError in RouteShieldCallback.onRoadShields.
To convert the returned in RouteShield SVG ByteArray to a Bitmap use RouteShield.toBitmap.
Parameters
roadComponents
list of RoadComponent objects
userId
Mapbox user account name
styleId
style id used to render the map
callback
invoked with appropriate result