Route Options
Provides information connected to your request that help when a new directions request is needing using the identical parameters as the original request.
For example, if I request a driving (profile) with alternatives and continueStraight set to true. I make the request but loose reference and information which built the original request. Thus, If I only want to change a single variable such as the destination coordinate, i'd have to have all the other route information stores so the request was made identical to the previous but only now using this new destination point.
Using this class can provide you wth the information used when the DirectionsRoute was made.
Since
3.0.0
Constructors
Types
Properties
A valid access token that will included to the request.
Whether to try to return alternative routes (true) or not (false, default). An alternative route is a route that is significantly different than the fastest route, but also still reasonably fast. Such a route does not exist in all circumstances. Up to two alternatives may be returned. This is available for NavigationRoute.PROFILE_DRIVING_TRAFFIC, NavigationRoute.PROFILE_DRIVING, NavigationRoute.PROFILE_CYCLING.
A comma-separated list of annotations. Defines whether to return additional metadata along the route. Possible values are: NavigationRoute.ANNOTATION_DISTANCE NavigationRoute.ANNOTATION_CONGESTION NavigationRoute.ANNOTATION_MAXSPEED See the RouteLeg object for more details on what is included with annotations. Must be used in conjunction with overview=full.
Indicates from which side of the road to approach a waypoint. Accepts NavigationRoute.APPROACH_UNRESTRICTED (default) or NavigationRoute.APPROACH_CURB . If set to NavigationRoute.APPROACH_UNRESTRICTED, the route can approach waypoints from either side of the road. If set to NavigationRoute.APPROACH_CURB, the route will be returned so that on arrival, the waypoint will be found on the side that corresponds with the driving_side of the region in which the returned route is located. If provided, the list of approaches must be the same length as the list of waypoints.
Whether to return banner objects associated with the route steps (true) or not (false, default). Must be used in conjunction with RouteOptions.steps=true
Influences the direction in which a route starts from a waypoint. Used to filter the road segment the waypoint will be placed on by direction. This is useful for making sure the new routes of rerouted vehicles continue traveling in their current direction. A request that does this would provide bearing and radius values for the first waypoint and leave the remaining values empty. Returns two comma-separated values per waypoint: an angle clockwise from true north between 0 and 360, and the range of degrees by which the angle can deviate (recommended value is 45° or 90°), formatted as {angle, degrees}. If provided, the list of bearings must be the same length as the list of coordinates.
The allowed direction of travel when departing intermediate waypoints. If true, the route will continue in the same direction of travel. If false, the route may continue in the opposite direction of travel. Defaults to true for NavigationRoute.PROFILE_DRIVING and false for NavigationRoute.PROFILE_WALKING and NavigationRoute.PROFILE_CYCLING.
A list of Points to visit in order. There can be between two and 25 coordinates for most requests, or up to three coordinates for NavigationRoute.PROFILE_DRIVING_TRAFFIC requests. Note that these coordinates are different than the direction responses DirectionsWaypoints that these are the non-snapped coordinates.
The format of the returned geometry. Allowed values are: NavigationRoute.GEOMETRY_POLYLINE (default, a polyline with a precision of five decimal places), NavigationRoute.GEOMETRY_POLYLINE6 (a polyline with a precision of six decimal places).
Displays the requested type of overview geometry. Can be NavigationRoute.OVERVIEW_FULL (the most detailed geometry available), NavigationRoute.OVERVIEW_SIMPLIFIED (default, a simplified version of the full geometry), or NavigationRoute.OVERVIEW_FALSE (no overview geometry).
The routing profile to use. Possible values are NavigationRoute.PROFILE_DRIVING_TRAFFIC, NavigationRoute.PROFILE_DRIVING, NavigationRoute.PROFILE_WALKING, or NavigationRoute.PROFILE_CYCLING. The same profile which was used during the request that resulted in this root directions response. MapboxDirections.Builder ensures that a profile is always set even if the MapboxDirections requesting object doesn't specifically set a profile.
A universally unique identifier (UUID) for identifying and executing a similar specific route in the future.
Whether to emit instructions at roundabout exits (true) or not (false, default). Without this parameter, roundabout maneuvers are given as a single instruction that includes both entering and exiting the roundabout. With roundabout_exits=true, this maneuver becomes two instructions, one for entering the roundabout and one for exiting it. Must be used in conjunction with RouteOptions.steps=true.
A semicolon-separated list of booleans affecting snapping of waypoint locations to road segments. If true, road segments closed due to live-traffic closures will be considered for snapping. If false, they will not be considered for snapping. If provided, the number of snappingClosures must be the same as the number of coordinates. Must be used with NavigationRoute.PROFILE_DRIVING_TRAFFIC
Whether to return steps and turn-by-turn instructions (true) or not (false, default). If steps is set to true, the following guidance-related parameters will be available: RouteOptions.bannerInstructions, RouteOptions.language, RouteOptions.roundaboutExits, RouteOptions.voiceInstructions, RouteOptions.voiceUnits, RouteOptions.waypointNames, RouteOptions.waypointTargets, waypoints from RouteOptions.coordinates
Whether to return SSML marked-up text for voice guidance along the route (true) or not (false, default). Must be used in conjunction with RouteOptions.steps=true.
A type of units to return in the text for voice instructions. Can be UnitType.IMPERIAL (default) or UnitType.METRIC. Must be used in conjunction with RouteOptions.steps=true and RouteOptions.voiceInstructions ()}=true.
To be used to specify settings for use with the walking profile.
Indicates which input coordinates should be treated as waypoints.
A semicolon-separated list of custom names for entries in the list of RouteOptions.coordinates, used for the arrival instruction in banners and voice instructions. Values can be any string, and the total number of all characters cannot exceed
A semicolon-separated list of coordinate pairs used to specify drop-off locations that are distinct from the locations specified in coordinates. If this parameter is provided, the Directions API will compute the side of the street, left or right, for each target based on the waypoint_targets and the driving direction. The maneuver.modifier, banner and voice instructions will be updated with the computed side of street. The number of waypoint targets must be the same as the number of coordinates. Must be used with RouteOptions.steps = true.