-
Notifications
You must be signed in to change notification settings - Fork 118
Description
The recent addition of the Navigator to MapboxNavigator in mapbox/mapbox-navigation-android#1336 lets us key in on some more routing options when in offline-mode. It would be great if we could start exposing some of those options in our URL builder so that offline users can take advantage of those!
Currently the Navigator supports the following additional url parameters for the cycling profile:
&bicycle_type=a&use_roads=1&use_hills=1&use_ferry=1&avoid_bad_surfaces=1
These features are powered by Valhalla and a detailed explanation of what each does can be found in the docs.
Here's a short list of each parameter, and the acceptable value ranges for them. All of them are optional on the url:
bicycle_typeis a string and can be any of:HybridRoadCityCrossMountainuse_roadsis a floating point number from 0.0 to 1.0 inclusiveuse_hillsis a floating point number from 0.0 to 1.0 inclusiveuse_ferryis a floating point number from 0.0 to 1.0 inclusiveavoid_bad_surfacesis a floating point number from 0.0 to 1.0 inclusivecycling_speedis a floating point number from 5kmh to 60kmh
After looking around it it seems like the way to expose them is by adding support for them them to: https://github.com/mapbox/mapbox-java/blob/master/services-directions/src/main/java/com/mapbox/api/directions/v5/MapboxDirections.java
cc @Guardiola31337 @devotaaabel @danesfeder @akitchen @coxchapman @mcwhittemore