Strange behaviour with "walking" profile
Hello,
I noticed some critical differences with regard to the information provided when the profile "walking" is selected. Differences are:
- intersections: when using "cycling" for instance, the first element of the array represents the intersections at the maneuver location, and you get all the roads crossing at that point. With walking, they are 2 only: the approach and outlet. The other roads crossing are no more indicated.
- roundabout: with "walking", roundabouts are splited in a succession of turn steps, sometimes 3 or 4 over a distance of 20 meters ...
Is it some bugs, or wanted behavior ? I believe this could at least be an option added in RouteOptions and allowing the user to choose what is the expected behavior.
Regards,
Julien
Both these behaviors would be dependent on the routing engine.
/cc @mapbox/navigation-api
@Juju31Fr could you post some complete examples of requests with the two behaviors?
For the intersection topic.
For demonstration, I use these 2 coordinates:
1 - CLLocationCoordinate2D(latitude: 48.840761398698106, longitude: 2.2450660820018413)
2 - CLLocationCoordinate2D(latitude: 48.841065620500814, longitude: 2.2445880620556125)
This a very simple route, with 1 intersection only. The request produces 3 RouteSteps: 1 depart, 1 turn, 1 arrive.

let waypoint1 = Waypoint(coordinate: CLLocationCoordinate2D(latitude: 48.840761398698106, longitude: 2.2450660820018413), coordinateAccuracy: 50, name: "") let waypoint2 = Waypoint(coordinate: CLLocationCoordinate2D(latitude: 48.841065620500814, longitude: 2.2445880620556125), coordinateAccuracy: 50, name: "") let routeOptions = RouteOptions(waypoints: [waypoint1, waypoint2], profileIdentifier: .cycling) Directions.shared.calculate(routeOptions)
The intersections array for the intermediate RouteStep is as follow using the "cycling" profile:
We can see the 3 "branches" of this intersection (75, 165, 345).
Now the same output using the "walking" profile:
The 165 degrees is no more there ...
@Juju31Fr ~This is due to a difference in the underlying engine between the two profiles. The walking profile is the new version and we are working on migrating Cycling to use this same version. So in time this difference should go away as we finish our migration.~
EDIT: This actually seems like a bug. We've reported it internally.
For the roundabout topic.
For demonstration, I use these 2 other coordinates:
1 - CLLocationCoordinate2D(latitude: 48.84381207205462, longitude: 2.17447780455754)
2 - CLLocationCoordinate2D(latitude: 48.84344198184451, longitude: 2.1749755688772154)
This is a roundabout.

Using the "cycling" profile, I get 2 RouteSteps to describe the roundabout: 1 takeRoundabout, and 1 exitRoundabout (because I have requested it in the options):

With the "walking" profile, I get 3: 1 turn, 1 continue, 1 turn, each of them separated by few meters only.
It would be nice to get the possibility (with an option may be) to have the "cycling" behavior for the walking profile as well.
I take an example: if you want to route a mountain bike workout, you need to select "walking" to get the ability to go off-road on trails. But when you come back on road, it's better to go through a roundabout with one instruction only explaining that you have to use the 2nd or 3rd exit, instead of having few turn/continue instructions every 2 or 3 seconds ...
Walking and cycling roundabout instructions are handled differently
I understand that. But as an enhancement, would it be possible to let the developer/user select which behavior is the most suitable for the use case, through an option or a parameter ?
This one should be fixed. Please check https://github.com/mapbox/mapbox-directions-swift/issues/563