mapbox / mapbox/mapbox-navigation-android
Mapbox with Walking profile doesn't draw route on pedestrian path if user is located on the Main street (i.e. Driving path)
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
In direction API, if my start location is located on main street, then route is drawn on the main street. I have configured my code with Walking profile hence my route should not be drawn on main street at any cost, as route should always be drawn according to nearest pedestrian path.
I checked above 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?
Steps to trigger behavior
- User's current location is on main street rather than on sidewalk.
- Using Mapbox Walking profile, the route shall be drawn including sidewalk and crosswalk for user's safety
Location - Chicago, USA
Direction API Request
Case 1: If start & destination coordinate is on main street and not on Sidewalk
Start Coordinate - 41.90084455967382, -87.6232866902274
Destination Coordinate - 41.900860585647926, -87.6252983194398
Case 2: If start coordinate is on main street & destination coordinate is on Sidewalk
Note: Snapshot attached is of this case
Start Coordinate - 41.90084455967382, -87.6232866902274
Destination Coordinate - 41.90086457822011, -87.62527686154802
`
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 the route is fetched using Mapbox Walking profile, then routes shall be drawn on the pedestrian path.
Actual behavior
Route is not drawn on sidewalk if start and destination location is present on main street.

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 at the mapboxNavigation.requestRoutes call and its WalkingOptions configuration, then reproduce both coordinate cases against the specified SDK versions. Inspect the returned route geometry and compare where it runs relative to pedestrian paths; the issue is resolved only if walking routes use the appropriate pedestrian path when the start is on the main street.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- api, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100