API Reference
AvoidFeature
const preferences = { avoids: [AvoidFeature.TOLL_ROAD, AvoidFeature.FERRY] }Pass one or more values in itinerary.preferences.avoids. A route can still include a feature if there is no suitable alternative.
Values
| Value | Description |
|---|---|
AvoidFeature.TOLL_ROAD | Roads that charge a toll. |
AvoidFeature.LIMITED_ACCESS | Highways with restricted entry and exit, such as freeways. |
AvoidFeature.FERRY | Crossings that require taking a ferry. |
AvoidFeature.TUNNEL | Road segments that pass through tunnels. |
AvoidFeature.DIRT_ROAD | Roads classified as dirt roads. |
AvoidFeature.SEASONAL_CLOSURE | Roads or crossings that close seasonally. Closure dates are estimates. |
AvoidFeature.U_TURN | A maneuver that reverses the direction of travel on the same road. |