Multi waypoints did not display default waypoint icons and lineview
francisceriousarlabs opened this issue · 0 comments
francisceriousarlabs commented
Hello,
Good day!
I have a usecase where I need to support more than 25 waypoints, so for example, I have 28 waypoints, so there's 2 groups/chunks of NavigationRoute
items, so I encountered an issue where the second NavigationRoute
or the waypoints 26-28 didn't display the waypoints and the lineview.
Android API: 33
Mapbox Navigation SDK version: com.mapbox.navigation:android:2.17.0
Steps to trigger behavior
- 28 waypoints
- call mapboxNavigation.setNavigationRoutes(routes)
- then routesObserver will get called and draw the line using routeLineApi and routeLineView
This is my route builder:
val routeBuilder = RouteOptions.builder()
.applyDefaultNavigationOptions()
.applyLanguageAndVoiceUnitOptions(context)
.waypointsPerRoute(true)
.continueStraight(true)
.steps(true)
.voiceInstructions(true)
.overview(DirectionsCriteria.OVERVIEW_FULL)
.annotationsList(
listOf(
DirectionsCriteria.ANNOTATION_CONGESTION_NUMERIC,
DirectionsCriteria.ANNOTATION_DURATION,
DirectionsCriteria.ANNOTATION_DISTANCE
)
)
.alternatives(false)
val addedWaypoints = WaypointsSet()
chunked.second.forEachIndexed { index, pair ->
addedWaypoints.addNamed(pair.second, pair.first?.nameOfPool.orEmpty())
}
routeBuilder
.newCoordinates(addedWaypoints.coordinatesList())
.waypointTargetsList(addedWaypoints.coordinatesList())
.waypointNamesList(addedWaypoints.waypointsNames())
.waypointIndicesList(addedWaypoints.waypointsIndices())
routeBuilder
.geometries(DirectionsCriteria.GEOMETRY_POLYLINE6)
.profile(DirectionsCriteria.PROFILE_DRIVING_TRAFFIC)
.voiceUnits(DirectionsCriteria.METRIC)
Expected behavior
It will show all the 28 waypoints and the lineview
how to achieve concatinated lineview and waypoints using the current version of mapbox navigation