mapbox / mapbox-directions-swift

Traffic-aware directions and map matching in Swift on iOS, macOS, tvOS, watchOS, and Linux
https://www.mapbox.com/navigation/
ISC License
178 stars 87 forks source link

RouteStep "names" property is nil for walking directions #783

Open sw5813 opened 1 year ago

sw5813 commented 1 year ago

For other profiles such as cycling or driving, the "names" property of a RouteStep object will be the road or path leading to the next maneuver. However, when using the walking profile, the "names" property is always nil. This seems like a bug?

Along the same lines, the "instructions" property for RouteStep also doesn't include the next road/path when using the walking profile, while it does for other profiles.

Driving Instructions: image

Walking instructions: image

jill-cardamon commented 1 year ago

Hi @sw5813! Thanks for reporting. What version of mapbox-directions-swift is resulting in this behavior? Are you using Directions.calculate(_:completionHandler:) to retrieve a RouteResponse?

sw5813 commented 1 year ago

Hi @jill-cardamon, I'm using v2.8.0 of MapboxDirections in my swift app and I'm calling Directions.shared.calculate(routeOptions!) { session, result in ... } to retrieve a RouteResponse. I also tried making the same adjustment in the Navigation-Examples demo app by modifying NavigationRouteOptions in the basic example: let options = NavigationRouteOptions(coordinates: [origin, destination], profileIdentifier: .walking) (adding the walking profile identifier) and saw the same result.