mapbox-navigation-android
mapbox-navigation-android copied to clipboard
MapboxManeuverView does not handle error result
MapboxManeuverView
currently renders maneuvers only when the result is Success and the components list is not empty
fun renderManeuvers(maneuvers: Expected<ManeuverError, List<Maneuver>>) {
maneuvers.onValue { list ->
if (list.isNotEmpty()) {
currentlyRenderedManeuvers.clear()
currentlyRenderedManeuvers.addAll(list)
renderManeuvers()
}
}
}
In this case if the list is empty or the result is error
, then the view would continue to show previous maneuver.