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
183 stars 88 forks source link

The 'cashTollOnly' RoadClasses value causes directions request to fail. #779

Closed kpennacchia closed 1 year ago

kpennacchia commented 1 year ago

Attempting to request directions while adding cashTollOnly to the exclusions causes the request to fail with the following error.

Exclude value must be one of: toll, motorway, ferry, unpaved, cash_only_tolls, border_crossing, point(lon lat)

Example code snippet:

let routeOptions = NavigationRouteOptions(waypoints: waypoints, profileIdentifier: .automobile)
routeOptions.roadClassesToAvoid = [.cashTollOnly]

It looks like the string value being used is cash_only_toll, but the correct value is cash_only_tolls.

mickbyrne commented 1 year ago

Same here, needs to be fixed!

Udumft commented 1 year ago

Hi! The fix has landed in this PR and should be available in next version release (2.10). Thank you for flagging the issue!