Include highways in scooter route
- Last UpdatedFeb 17, 2025
- 1 minute read
Scooters aren't allowed on highways by default. This is equivalent to setting the avoid[features]=controlledAccessHighway
parameter for other routing modes.
If highways can't be avoided, the Routing API tries to minimize the usage of highways and includes a notice in the response.
This request has the origin on a highway, and thus the highway can't be avoided:
The response contains the notice code violatedAvoidControlledAccessHighway
:
You can override this default behavior by setting the scooter[allowHighway]=true
parameter, thus allowing the use of highways. This is especially recommended if your vehicle is actually a motorcycle. See the following example:
The resulting route (in blue) stays on the highway until it's close to the destination. The original route (in purple) leaves the highway as early as possible:
