Routes Preferred API is currently available only to select customers.
Contact sales to learn more.
RouteModifiers
Stay organized with collections
Save and categorize content based on your preferences.
Encapsulates a set of optional conditions to satisfy when calculating the routes.
JSON representation |
{
"avoidTolls": boolean,
"avoidHighways": boolean,
"avoidFerries": boolean,
"avoidIndoor": boolean,
"vehicleInfo": {
object (VehicleInfo )
},
"tollPasses": [
enum (TollPass )
]
} |
Fields |
avoidTolls |
boolean
When set to true, avoids toll roads where reasonable, giving preference to routes not containing toll roads. Applies only to the DRIVE and TWO_WHEELER travel modes.
|
avoidHighways |
boolean
When set to true, avoids highways where reasonable, giving preference to routes not containing highways. Applies only to the DRIVE and TWO_WHEELER travel modes.
|
avoidFerries |
boolean
When set to true, avoids ferries where reasonable, giving preference to routes not containing ferries. Applies only to the DRIVE andTWO_WHEELER travel modes.
|
avoidIndoor |
boolean
When set to true, avoids navigating indoors where reasonable, giving preference to routes not containing indoor navigation. Applies only to the WALK travel mode.
|
vehicleInfo |
object (VehicleInfo )
Specifies the vehicle information.
|
tollPasses[] |
enum (TollPass )
Encapsulates information about toll passes. If toll passes are provided, the API tries to return the pass price. If toll passes are not provided, the API treats the toll pass as unknown and tries to return the cash price. Applies only to the DRIVE and TWO_WHEELER travel modes.
|
VehicleInfo
Encapsulates the vehicle information, such as the vehicle emission type.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-23 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-23 UTC."],[[["Route modifiers allow specifying optional conditions like avoiding tolls, highways, ferries, or indoor navigation."],["These modifiers primarily apply to `DRIVE`, `TWO_WHEELER`, and `WALK` travel modes."],["Vehicle information, including emission type, can be provided for route calculation."],["Toll pass details can be included to receive pass-specific pricing information."]]],["The content details optional route conditions, including avoiding tolls, highways, ferries, and indoor navigation. These avoidance options are set using boolean values. Vehicle information, such as `emissionType`, can also be specified. The user can provide information regarding toll passes. The API will try to return the pass price for routes if toll passes are provided, and cash prices if not. These options apply to different travel modes.\n"]]