mapbox / mapbox/mapbox-navigation-android
Multi waypoints did not display default waypoint icons and lineview
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
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
1. 28 waypoints
2. call mapboxNavigation.setNavigationRoutes(routes)
3. 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
### Actual behavior
Please see screenshot
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the 28-waypoint case on Mapbox Navigation SDK 2.17.0 using the shown route builder and mapboxNavigation.setNavigationRoutes(routes). Trace the routesObserver callback through routeLineApi and routeLineView, comparing rendering for waypoints 1-25 with 26-28. Done means all waypoints and the concatenated lineview are displayed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100