mapbox / mapbox/mapbox-navigation-android

Multi waypoints did not display default waypoint icons and lineview

Aperta
#7,768 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Kotlin
Stelle
651
Fork
321
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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
Screen Shot 2024-02-28 at 8 55 07 AM

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo il caso con 28 waypoints su Mapbox Navigation SDK 2.17.0 utilizzando il route builder mostrato e mapboxNavigation.setNavigationRoutes(routes). Traccia il callback di routesObserver attraverso routeLineApi e routeLineView, confrontando il rendering dei waypoints 1–25 con quello dei waypoints 26–28. Il lavoro è completato quando vengono visualizzati tutti i waypoints e la lineview concatenata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
android, kotlin
Ambito
mobile
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.