mapbox / mapbox/mapbox-navigation-android
Lane guidance not showing, using Navigation Drop-in UI
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
Android API:
Mapbox Navigation SDK version:
implementation 'com.mapbox.maps:android:10.13.0'
implementation 'com.mapbox.navigation:ui-dropin:2.13.1'
Steps to trigger behavior
- Request route and preview it
- Start navigation
- Maneuver instructions have no lane guidance
Expected behavior
Expected navigation at motorways/roundabouts to suggest which lane to be in.
Actual behavior
No lane guidance
More info:
I am using the Navigation drop-in ui and have been using various routes and noticed no lane guidance was showing. I read this article which used an example, so I simulated this route in android studio using an emulator to see whether it was just because there was no lane guidance information in the routes I was using before. But this also did not show lane guidance.
I create routes outside the NavigationView as in this example. I assumed the drop-in ui handles maneuver/banner instructions automatically, and can see in some examples that lane guidance is shown. Am I missing something?
Code:
private fun createRoute(points: List<Point>, type: String){
val routeOptions = RouteOptions.builder()
.applyDefaultNavigationOptions()
.applyLanguageAndVoiceUnitOptions(this)
.bannerInstructions(true)
.coordinatesList(points)
.waypointIndicesList(listOf(0, points.lastIndex))
.roundaboutExits(true)
.alternatives(false)
.enableRefresh(false)
.build()
mapboxNavigation?.requestRoutes(
routeOptions,
object : NavigationRouterCallback {
override fun onRoutesReady(
routes: List<NavigationRoute>,
routerOrigin: RouterOrigin
) {
if(lastLeg) {
// Show final destination marker
navView.customizeViewStyles {
destinationMarkerAnnotationOptions = ViewStyleCustomization.defaultDestinationMarkerAnnotationOptions(this@NavigationActivity)
}
}
// first request needs to be route preview
if(type == "start") {
navView.api.startRoutePreview(routes)
mapboxNavigation?.registerRouteProgressObserver(routeProgressObserver)
// Simulates route
navView.api.routeReplayEnabled(true)
// Disables auto rerouting
mapboxNavigation?.setRerouteEnabled(false)
}
// other requests (for rerouting) needs to set navigation routes
else {
mapboxNavigation?.setNavigationRoutes(routes)
}
}
override fun onFailure(reasons: List<RouterFailure>, routeOptions: RouteOptions) {
val errorMessage = reasons[0].message
Log.e(tag, "Failed to create route! $errorMessage")
//TODO Handle route failure
}
override fun onCanceled(routeOptions: RouteOptions, routerOrigin: RouterOrigin) {
Log.e(tag, "Create route cancelled")
//TODO Handle route failure
}
}
)
}
The coordinates I used:
[
{
"lon": -111.82453880043073,
"lat": 40.688308428645286
},
{
"lon": -111.82450363096808,
"lat": 40.69349512485448
},
{
"lon": -111.8244946213082,
"lat": 40.69675410764856
},
{
"lon": -111.83411346931487,
"lat": 40.69671411092193
},
{
"lon": -111.83411346931487,
"lat": 40.69988710994559
},
{
"lon": -111.83411272586038,
"lat": 40.70252410468774
}
]
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 with the Navigation Drop-in UI and the navigation-view request-routes example, using the reported SDK versions, route options, and coordinates to reproduce the missing lane guidance. Compare the route preview and simulated navigation behavior with the custom trip-progress example; done means determining why the expected lane guidance is absent and identifying the affected SDK behavior or configuration.
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
- Mostly clear
- Newbie friendliness
- 25/100