mapbox / mapbox/mapbox-navigation-android
Mapbox doesn't update navigation instruction information during backward navigation.
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
**Android API:29**
**Mapbox Maps SDK version:9.6.1**
**Mapbox Navigation UI SDK version:1.5.1**
I was exploring **MapBox Direction API** using **Walking profile** and experienced the following issue
### Steps to trigger behavior
1. Make a Direction API call using below request
2. Start navigation on route that has left/right turns (e.g. "Turn left onto walkway in 300 feet") or direction specific instruction (e.g. "Walk North for 300 feet")
3. After covering 1 or 2 milestones, navigate backward towards the starting point of the route.
**Location** - Chicago, USA
**Direction API Request**
Start Coordinate - 41.893196, -87.636569
Destination Coordinate - 41.883301, -87.635309
`
val walking: WalkingOptions = WalkingOptions.builder().alleyBias(1.0).walkwayBias(1.0).build()
mapboxNavigation.requestRoutes(
RouteOptions.builder()
.accessToken(accessToken)
.baseUrl(RouteUrl.BASE_URL)
.user(RouteUrl.PROFILE_DEFAULT_USER)
.requestUuid("")
.coordinates(listOf(coordinateList.first(), coordinateList.last()))
.geometries(RouteUrl.GEOMETRY_POLYLINE6)
.profile(RouteUrl.PROFILE_WALKING)
.steps(true)
.overview(RouteUrl.OVERVIEW_FULL)
.bannerInstructions(true)
.walkingOptions(walking)
.build(),
routesReqCallback
)
`
### Expected behavior
**If user moves backward on route, then
1. Mapbox shall provide updated instruction accordingly. For example, if navigation instruction in forward navigation is "Turn left onto walkway" then in backward navigation, the instruction shall be "Turn right onto walkway"
2. Mapbox shall provide updated instruction accordingly. For example, if navigation instruction in forward navigation is "Walk North" then in backward navigation, the instruction shall be "Walk South"**
### Actual behavior
Mapbox does not provide updated directions/turns in navigation instruction if user navigates backward on the route.
For example, if navigation instruction in forward navigation is "Turn left onto walkway" then in backward navigation, the instruction is same and does not change.
**I checked this scenario in Google and found working as expected. Please let me know if this is a bug in MapBox Direction API or am I missing any configuration in my code?**
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 walking route from the Direction API request on Android API 29 with Mapbox Navigation UI SDK 1.5.1, then trace instruction selection after moving backward past one or two milestones. Done means left/right turn and compass-direction instructions update appropriately during backward navigation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100