-
Notifications
You must be signed in to change notification settings - Fork 319
driving-traffic ends route early and snaps destination to a larger road instead of the final local road #7947
Description
Android API: 29~36
Mapbox Navigation SDK version: 3.21.0-rc.1
Steps to trigger behavior
- Request a route with the
driving-trafficprofile to a destination that is reachable via a narrow local/public road near the destination. - Use a destination around Shakujii Shrine, Nerima, Tokyo, Japan, or another similar case where the destination is slightly off the main road and the final access is via a local street.
- Compare the result of
driving-trafficwithdrivingfor the same origin/destination. - Observe that with
driving-traffic, the route ends on a larger road before the destination and arrival is announced early. Withdriving, the route continues onto the local road and reaches much closer to the destination.
Example
from: 139.619976,35.765228
to: 139.603026,35.747831
Expected behavior
driving-traffic should still route onto the final drivable local road near the destination when that road is publicly accessible and routable, while using traffic-aware weighting on the major parts of the route.
In other words, traffic awareness should not cause the destination waypoint to be snapped to a larger road significantly before the actual reachable destination if a valid final local-road approach exists.
Actual behavior
With driving-traffic, the destination is snapped to a larger road before the destination, and the route ends early instead of entering the final local road.
In our case, the route line ends roughly 100m before the destination, and navigation effectively finishes there. The local road is visible on the map and is a normal public road, not private property or an indoor/internal road.
For the same origin/destination, driving produces a route that follows the final local road and reaches much closer to the destination.
This makes driving-traffic unusable for destination accuracy in these cases, because arrival is reported too early even though vehicle access via the final local street exists.
Minimal code
val routeOptions = RouteOptions.builder()
.applyDefaultNavigationOptions(DirectionsCriteria.PROFILE_DRIVING_TRAFFIC)
.applyLanguageAndVoiceUnitOptions(context)
.coordinatesList(listOf(origin, destination))
.build()
mapboxNavigation.requestRoutes(
routeOptions,
object : NavigationRouterCallback {
override fun onRoutesReady(
routes: List<NavigationRoute>,
routerOrigin: String,
) {
// draw route
}
override fun onFailure(
reasons: List<RouterFailure>,
routeOptions: RouteOptions,
) = Unit
override fun onCanceled(
routeOptions: RouteOptions,
routerOrigin: String,
) = Unit
},
)Notes
- This reproduces consistently, not just at one destination.
- The problem appears with driving-traffic; switching to driving improves the final approach.
- Tightening the destination radiuses value (for example 10m) often results in NoSegment, which suggests that the driving-traffic profile is not considering the final local road as a valid routable endpoint in these cases.
- According to the Directions API docs, returned waypoints are snapped to the road network. In this case, the snapping result for driving-traffic appears too aggressive and prefers a larger road over the valid final local road.
- I can attach screenshots showing:
- driving-traffic route ending early on the main road
- driving behaving closer to the expected result than driving-traffic
| driving-traffic | driving |
|---|---|
![]() |
![]() |
Question
Is this expected behavior for driving-traffic?
If so, is there any supported way to make driving-traffic keep traffic-aware routing on major roads while still using the final valid local road near the destination instead of snapping arrival to a larger road too early?

