Closed Christophe668 closed 2 years ago
Hey @Christophe668, unfortunately, the cycling
profile does not support the congestion_numeric
input which is default for other profiles. We're tracking this issue internally to unblock it on the API side but to work around this problem for now, you should use the congestion
annotation instead.
For example:
RouteOptions.builder()
.applyDefaultNavigationOptions()
.applyLanguageAndVoiceUnitOptions(this)
.profile(DirectionsCriteria.PROFILE_CYCLING)
.coordinatesList(listOf(origin, destination))
.annotationsList(
listOf(
DirectionsCriteria.ANNOTATION_CONGESTION,
DirectionsCriteria.ANNOTATION_MAXSPEED,
DirectionsCriteria.ANNOTATION_SPEED,
DirectionsCriteria.ANNOTATION_DURATION,
DirectionsCriteria.ANNOTATION_DISTANCE
)
)
...
.build()
I'm going to go ahead and close here but please let us know if this didn't do the trick.
Android API: Mapbox Navigation SDK version: 2.0.0 (GA)
Steps to trigger behavior
Looks like rerouting fails because of this :
It's trying to reroute in a loop
Profile: Cycling