mapbox-navigation-android icon indicating copy to clipboard operation
mapbox-navigation-android copied to clipboard

Mapbox with Walking profile doesn't draw route on pedestrian path if user is located on the Main street (i.e. Driving path)

Open shreya-ja opened this issue 4 years ago • 2 comments

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

  1. User's current location is on main street rather than on sidewalk.
  2. 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.

ROUTE_NOT_DRAWN_ON_SIDEWALK

shreya-ja avatar Jun 27 '21 14:06 shreya-ja

This would be the behavior of the Directions API’s walking profile (and Valhalla under the hood). @browndp08 can someone on your team confirm if this is still the case? Thanks!

1ec5 avatar Aug 11 '22 15:08 1ec5

I’ve opened an internal issue to track enhancing the Directions API’s underlying routing engine to account for separately drawn sidewalk ways when snapping waypoints.

1ec5 avatar Aug 12 '22 18:08 1ec5