public abstract static class RouteOptions.Builder
extends java.lang.Object
RouteOptions
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
abstract RouteOptions.Builder |
alleyBias(java.lang.Double alleyBias)
A scale from -1 to 1, where -1 biases the route against alleys
and 1 biases the route toward alleys.
|
abstract RouteOptions.Builder |
alternatives(java.lang.Boolean alternatives)
Whether to try to return alternative routes (true) or not (false, default).
|
abstract RouteOptions.Builder |
annotations(java.lang.String annotations)
A comma-separated list of annotations.
|
RouteOptions.Builder |
annotationsList(java.util.List<java.lang.String> annotations)
A list of annotations.
|
abstract RouteOptions.Builder |
approaches(java.lang.String approaches)
A semicolon-separated list indicating from which side of the road
to approach a waypoint.
|
RouteOptions.Builder |
approachesList(java.util.List<java.lang.String> approaches)
Indicates from which side of the road to approach a waypoint.
|
abstract RouteOptions.Builder |
arriveBy(java.lang.String arriveBy)
The desired arrival time, formatted as a timestamp in ISO-8601 format
in the local time at the route destination.
|
abstract RouteOptions.Builder |
avoidManeuverRadius(java.lang.Double avoidManeuverRadius)
A radius around a starting point where the routes' provider tries to avoid any
significant maneuvers.
|
abstract RouteOptions.Builder |
bannerInstructions(java.lang.Boolean bannerInstructions)
Whether to return banner objects associated with the route steps (true) or not
(false, default if null).
|
abstract RouteOptions.Builder |
baseUrl(java.lang.String baseUrl)
Base URL for the request.
|
abstract RouteOptions.Builder |
bearings(java.lang.String bearings)
Influences the direction in which a route starts from a waypoint.
|
RouteOptions.Builder |
bearingsList(java.util.List<Bearing> bearings)
Influences the direction in which a route starts from a waypoint.
|
abstract RouteOptions |
build()
Builds the object.
|
abstract RouteOptions.Builder |
computeTollCost(java.lang.Boolean computeTollCost) |
abstract RouteOptions.Builder |
continueStraight(java.lang.Boolean continueStraight)
The allowed direction of travel when departing intermediate waypoints.
|
abstract RouteOptions.Builder |
coordinates(java.lang.String coordinates)
A semicolon-separated list of {longitude},{latitude} coordinate pairs to visit in order.
|
RouteOptions.Builder |
coordinatesList(java.util.List<com.mapbox.geojson.Point> coordinates)
A list of Points to visit in order.
|
abstract RouteOptions.Builder |
departAt(java.lang.String departAt)
The departure time, formatted as a timestamp in ISO-8601 format in the local time
at the route origin.
|
abstract RouteOptions.Builder |
enableRefresh(java.lang.Boolean enableRefresh)
Whether the routes should be refreshable via the directions refresh API.
|
abstract RouteOptions.Builder |
exclude(java.lang.String exclude)
Exclude certain road types or points from routing.
|
RouteOptions.Builder |
excludeList(java.util.List<java.lang.String> exclude)
Exclude certain road types or points from routing.
|
RouteOptions.Builder |
excludeObject(Exclude exclude)
Exclude certain road types or points from routing.
|
abstract RouteOptions.Builder |
geometries(java.lang.String geometries)
The format of the returned geometry.
|
abstract RouteOptions.Builder |
include(java.lang.String include)
Include certain road types in routing.
|
RouteOptions.Builder |
includeList(java.util.List<java.lang.String> include)
Include certain road types in routing.
|
abstract RouteOptions.Builder |
language(java.lang.String language)
The language of returned turn-by-turn text instructions.
|
abstract RouteOptions.Builder |
layers(java.lang.String layers)
Influences layer of road from where route starts from a waypoint.
|
RouteOptions.Builder |
layersList(java.util.List<java.lang.Integer> layers)
Influences layer of road from where route starts from a waypoint.
|
abstract RouteOptions.Builder |
maxHeight(java.lang.Double maxHeight)
The max vehicle height in meters.
|
abstract RouteOptions.Builder |
maxWeight(java.lang.Double maxWeight)
The max vehicle weight, in metric tons (1000 kg).
|
abstract RouteOptions.Builder |
maxWidth(java.lang.Double maxWidth)
The max vehicle width in meters.
|
abstract RouteOptions.Builder |
metadata(java.lang.Boolean metadata)
Whether the response should contain metadata holding versioning information.
|
abstract RouteOptions.Builder |
overview(java.lang.String overview)
Displays the requested type of overview geometry.
|
abstract RouteOptions.Builder |
paymentMethods(java.lang.String paymentMethods) |
RouteOptions.Builder |
paymentMethodsList(java.util.List<java.lang.String> paymentMethods) |
abstract RouteOptions.Builder |
profile(java.lang.String profile)
The routing profile to use.
|
abstract RouteOptions.Builder |
radiuses(java.lang.String radiuses)
The maximum distance a coordinate can be moved to snap to the road network in meters.
|
RouteOptions.Builder |
radiusesList(java.util.List<java.lang.Double> radiuses)
The maximum distance a coordinate can be moved to snap to the road network in meters.
|
abstract RouteOptions.Builder |
roundaboutExits(java.lang.Boolean roundaboutExits)
Whether to emit instructions at roundabout exits (true) or not (false, default if null).
|
abstract RouteOptions.Builder |
snappingIncludeClosures(java.lang.String snappingClosures)
A semicolon-separated list of booleans affecting snapping of waypoint locations to road
segments.
|
RouteOptions.Builder |
snappingIncludeClosuresList(java.util.List<java.lang.Boolean> snappingClosures)
A list of booleans affecting snapping of waypoint locations to road segments.
|
abstract RouteOptions.Builder |
snappingIncludeStaticClosures(java.lang.String snappingStaticClosures)
A semicolon-separated list of booleans affecting snapping of
waypoint locations to road segments.
|
RouteOptions.Builder |
snappingIncludeStaticClosuresList(java.util.List<java.lang.Boolean> snappingStaticClosures)
A list of booleans affecting snapping of waypoint locations to road segments.
|
abstract RouteOptions.Builder |
steps(java.lang.Boolean steps)
Whether to return steps and turn-by-turn instructions (true)
or not (false if null, default).
|
abstract RouteOptions.Builder |
suppressVoiceInstructionLocalNames(java.lang.Boolean suppressVoiceInstructionLocalNames) |
T |
unrecognizedJsonProperties(java.util.Map<java.lang.String,com.google.gson.JsonElement> unrecognizedProperties)
Use this method to add parameters which are not present in the model yet but are supported
on the Directions API side in the response.
|
RouteOptions.Builder |
unrecognizedProperties(java.util.Map<java.lang.String,java.lang.String> unrecognizedProperties)
Use this method to add request parameters,
which are not present in the model yet but are supported on the Directions API,
to a URL generated by `RouteOptions#toUrl`.
|
abstract RouteOptions.Builder |
user(java.lang.String user)
The user parameter of the request, defaults to "mapbox".
|
abstract RouteOptions.Builder |
voiceInstructions(java.lang.Boolean voiceInstructions)
Whether to return SSML marked-up text for voice guidance along the route (true) or not
(false, default if null).
|
abstract RouteOptions.Builder |
voiceUnits(java.lang.String voiceUnits)
A type of units to return in the text for voice instructions.
|
abstract RouteOptions.Builder |
walkingSpeed(java.lang.Double walkingSpeed)
The walking speed in meters per second with a minimum of 0.14 m/s (or 0.5 km/h)
and a maximum of 6.94 m/s (or 25.0 km/h).
|
abstract RouteOptions.Builder |
walkwayBias(java.lang.Double walkwayBias)
A bias which determines whether the route should prefer or avoid the use of roads or paths
that are set aside for pedestrian-only use (walkways).
|
abstract RouteOptions.Builder |
waypointIndices(java.lang.String waypointIndices)
A semicolon-separated list indicating which input coordinates
should be treated as waypoints.
|
RouteOptions.Builder |
waypointIndicesList(java.util.List<java.lang.Integer> indices)
A list indicating which input coordinates should be treated as waypoints.
|
abstract RouteOptions.Builder |
waypointNames(java.lang.String waypointNames)
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. |
RouteOptions.Builder |
waypointNamesList(java.util.List<java.lang.String> waypointNames)
A list of custom names for entries in the list of
RouteOptions.coordinatesList() , used for the arrival instruction in banners and voice
instructions. |
abstract RouteOptions.Builder |
waypointsPerRoute(java.lang.Boolean waypointsPerRoute)
If true, the waypoints array is returned within the route object, else its returned
at the root of the response body.
|
abstract RouteOptions.Builder |
waypointTargets(java.lang.String waypointTargets)
A semicolon-separated list of coordinate pairs used to specify drop-off
locations that are distinct from the locations specified in coordinates.
|
RouteOptions.Builder |
waypointTargetsList(java.util.List<com.mapbox.geojson.Point> waypointTargets)
A list of points used to specify drop-off
locations that are distinct from the locations specified in coordinates.
|
@NonNull public abstract RouteOptions.Builder baseUrl(@NonNull java.lang.String baseUrl)
baseUrl
- string value representing the base URL@NonNull public abstract RouteOptions.Builder user(@NonNull java.lang.String user)
user
- string with the user@NonNull public abstract RouteOptions.Builder profile(@NonNull java.lang.String profile)
DirectionsCriteria.PROFILE_DRIVING_TRAFFIC
,
DirectionsCriteria.PROFILE_DRIVING
,
DirectionsCriteria.PROFILE_WALKING
, or DirectionsCriteria.PROFILE_CYCLING
.profile
- string value representing the profile defined in
DirectionsCriteria.ProfileCriteria
@NonNull public abstract RouteOptions.Builder coordinates(@NonNull java.lang.String coordinates)
DirectionsCriteria.PROFILE_DRIVING_TRAFFIC
requests.
Contact Mapbox Support if you'd like to extend this limit.
Note that these coordinates are different than the DirectionsWaypoint
s
found in the DirectionsResponse
which are snapped to a road.
coordinates
- a list of Point
s which represent the route origin, destination,
and optionally waypoints@NonNull public RouteOptions.Builder coordinatesList(@NonNull java.util.List<com.mapbox.geojson.Point> coordinates)
DirectionsCriteria.PROFILE_DRIVING_TRAFFIC
requests.
Contact Mapbox Support if you'd like to extend this limit.
Note that these coordinates are different than the DirectionsWaypoint
s
found in the DirectionsResponse
which are snapped to a road.
coordinates
- a list of Point
s which represent the route origin, destination,
and optionally waypoints@NonNull public abstract RouteOptions.Builder alternatives(@Nullable java.lang.Boolean alternatives)
DirectionsCriteria.PROFILE_DRIVING_TRAFFIC
,
DirectionsCriteria.PROFILE_DRIVING
, DirectionsCriteria.PROFILE_CYCLING
.
The order of the routes in the response is not sorted by duration, but by weight. The first route in the list is not the most preferable because of the duration, but also based on the type of maneuvers.
If null is provided, the Directions API defaults to false.
alternatives
- boolean object representing the setting for alternatives@NonNull public abstract RouteOptions.Builder language(@Nullable java.lang.String language)
RouteOptions.steps()
=true.
Refer to supported languages list for details.
language
- the language as a string used during the request@NonNull public abstract RouteOptions.Builder radiuses(@Nullable java.lang.String radiuses)
A NoSegment error is returned if no routable road is found within the radius.
radiuses
- a string representing the radiuses separated by ";".@NonNull public RouteOptions.Builder radiusesList(@Nullable java.util.List<java.lang.Double> radiuses)
Double.POSITIVE_INFINITY
for unlimited.
A NoSegment error is returned if no routable road is found within the radius.
radiuses
- a list of radiuses@NonNull public abstract RouteOptions.Builder bearings(@Nullable java.lang.String bearings)
bearings
- a string representing the bearings with the ; separator.
Angle and degrees for every bearing value are comma-separated.@NonNull public RouteOptions.Builder bearingsList(@Nullable java.util.List<Bearing> bearings)
Bearing
objects.
If provided, the list of bearings must be the same length as the list of coordinates. However, you can skip a coordinate and show its position in the list with null.
bearings
- a List of list of doubles representing the bearings used in the original
request.
The first value in the list is the angle, the second one is the degrees.@NonNull public abstract RouteOptions.Builder avoidManeuverRadius(@Nullable java.lang.Double avoidManeuverRadius)
Note: the param cannot be used with departAt(String)
and arriveBy(String)
,
since these modes are used for reference requests, not for real-time routing.
avoidManeuverRadius
- avoid maneuver radius, in meters. Possible range is [0, 1000].@NonNull public abstract RouteOptions.Builder layers(@Nullable java.lang.String layers)
If provided, the list of layers must be the same length as the list of coordinates.
layers
- a string representing the layers with the ; separator.@NonNull public RouteOptions.Builder layersList(@Nullable java.util.List<java.lang.Integer> layers)
If provided, the list of layers must be the same length as the list of coordinates.
layers
- a list of layers. For unknown layer use `null`.@NonNull public abstract RouteOptions.Builder continueStraight(@Nullable java.lang.Boolean continueStraight)
DirectionsCriteria.PROFILE_DRIVING
and false
for DirectionsCriteria.PROFILE_WALKING
and
DirectionsCriteria.PROFILE_CYCLING
.continueStraight
- a boolean value representing whether or not continueStraight
was enabled or during the initial request@NonNull public abstract RouteOptions.Builder roundaboutExits(@Nullable java.lang.Boolean roundaboutExits)
RouteOptions.steps()
=true.roundaboutExits
- a boolean value representing whether or not roundaboutExits
is enabled or disabled@NonNull public abstract RouteOptions.Builder geometries(@NonNull java.lang.String geometries)
DirectionsCriteria.GEOMETRY_POLYLINE
(a polyline with a precision of five
decimal places), DirectionsCriteria.GEOMETRY_POLYLINE6
(default, a polyline with a precision of six decimal places).geometries
- String geometry type from DirectionsCriteria.GeometriesCriteria
.@NonNull public abstract RouteOptions.Builder overview(@Nullable java.lang.String overview)
DirectionsCriteria.OVERVIEW_FULL
(the most detailed geometry
available), DirectionsCriteria.OVERVIEW_SIMPLIFIED
(default if null,
a simplified version of the full geometry),
or DirectionsCriteria.OVERVIEW_FALSE
(no overview geometry).overview
- null or one of the options found in
DirectionsCriteria.OverviewCriteria
@NonNull public abstract RouteOptions.Builder steps(@Nullable java.lang.Boolean steps)
RouteOptions.bannerInstructions()
, RouteOptions.language()
,
RouteOptions.roundaboutExits()
, RouteOptions.voiceInstructions()
,
RouteOptions.voiceUnits()
, RouteOptions.waypointNames()
,
RouteOptions.waypointNamesList()
, RouteOptions.waypointTargets()
,
RouteOptions.waypointTargetsList()
, RouteOptions.waypointIndices()
,
RouteOptions.waypointIndicesList()
, RouteOptions.alleyBias()
steps
- true if you'd like step information, false or null otherwise@NonNull public abstract RouteOptions.Builder annotations(@Nullable java.lang.String annotations)
DirectionsCriteria.ANNOTATION_DISTANCE
DirectionsCriteria.ANNOTATION_DURATION
DirectionsCriteria.ANNOTATION_SPEED
DirectionsCriteria.ANNOTATION_CONGESTION
DirectionsCriteria.ANNOTATION_CONGESTION_NUMERIC
DirectionsCriteria.ANNOTATION_MAXSPEED
DirectionsCriteria.ANNOTATION_CLOSURE
See the RouteLeg
object for more details on what is included with annotations.
Must be used in conjunction with DirectionsCriteria.OVERVIEW_FULL
in RouteOptions.overview()
.
annotations
- a string containing requested annotations@NonNull public RouteOptions.Builder annotationsList(@Nullable java.util.List<java.lang.String> annotations)
DirectionsCriteria.ANNOTATION_DISTANCE
DirectionsCriteria.ANNOTATION_DURATION
DirectionsCriteria.ANNOTATION_SPEED
DirectionsCriteria.ANNOTATION_CONGESTION
DirectionsCriteria.ANNOTATION_CONGESTION_NUMERIC
DirectionsCriteria.ANNOTATION_MAXSPEED
DirectionsCriteria.ANNOTATION_CLOSURE
See the RouteLeg
object for more details on what is included with annotations.
Must be used in conjunction with DirectionsCriteria.OVERVIEW_FULL
in RouteOptions.overview()
.
annotations
- a list of annotations that were used during the request@NonNull public abstract RouteOptions.Builder voiceInstructions(@Nullable java.lang.Boolean voiceInstructions)
RouteOptions.steps()
=true.voiceInstructions
- true if the request included voice instructions@NonNull public abstract RouteOptions.Builder bannerInstructions(@Nullable java.lang.Boolean bannerInstructions)
RouteOptions.steps()
=true.bannerInstructions
- true if the request includes banner instructions@NonNull public abstract RouteOptions.Builder voiceUnits(@Nullable java.lang.String voiceUnits)
DirectionsCriteria.IMPERIAL
(default) or DirectionsCriteria.METRIC
.
Must be used in conjunction with RouteOptions.steps()
=true and
RouteOptions.steps()
=true
and RouteOptions.voiceInstructions()
=true.voiceUnits
- a string matching either imperial or metric@NonNull public abstract RouteOptions.Builder exclude(@Nullable java.lang.String exclude)
DirectionsCriteria.PROFILE_DRIVING
: One of DirectionsCriteria.EXCLUDE_TOLL
,
DirectionsCriteria.EXCLUDE_MOTORWAY
, or DirectionsCriteria.EXCLUDE_FERRY
.
DirectionsCriteria.PROFILE_DRIVING_TRAFFIC
: One of
DirectionsCriteria.EXCLUDE_TOLL
, DirectionsCriteria.EXCLUDE_MOTORWAY
, or
DirectionsCriteria.EXCLUDE_FERRY
.
DirectionsCriteria.PROFILE_WALKING
: No excludes supported
DirectionsCriteria.PROFILE_CYCLING
: DirectionsCriteria.EXCLUDE_FERRY
Use following format to exclude a point: point(longitude latitude)
exclude
- a comma separated string. Each value matches one of
the DirectionsCriteria.ExcludeCriteria
exclusions or point format.@NonNull public RouteOptions.Builder excludeList(@Nullable java.util.List<java.lang.String> exclude)
DirectionsCriteria.PROFILE_DRIVING
: One of DirectionsCriteria.EXCLUDE_TOLL
,
DirectionsCriteria.EXCLUDE_MOTORWAY
, or DirectionsCriteria.EXCLUDE_FERRY
.
DirectionsCriteria.PROFILE_DRIVING_TRAFFIC
: One of
DirectionsCriteria.EXCLUDE_TOLL
, DirectionsCriteria.EXCLUDE_MOTORWAY
, or
DirectionsCriteria.EXCLUDE_FERRY
.
DirectionsCriteria.PROFILE_WALKING
: No excludes supported
DirectionsCriteria.PROFILE_CYCLING
: DirectionsCriteria.EXCLUDE_FERRY
Use following format to exclude a point: point(longitude latitude)
exclude
- a list of exclude that were used during the request@NonNull public RouteOptions.Builder excludeObject(@Nullable Exclude exclude)
Exclude object may not provide all features that are currently present by Direction API.
See Exclude
for more details.
exclude
- an object of excludes that are used during the request.
Use Exclude.Builder
to build exclude.@NonNull public abstract RouteOptions.Builder include(@Nullable java.lang.String include)
DirectionsCriteria.PROFILE_DRIVING
: One of DirectionsCriteria.INCLUDE_HOV2
,
DirectionsCriteria.INCLUDE_HOV3
, or DirectionsCriteria.INCLUDE_HOT
.
DirectionsCriteria.PROFILE_DRIVING_TRAFFIC
: One of
DirectionsCriteria.INCLUDE_HOV2
, DirectionsCriteria.INCLUDE_HOV3
, or
DirectionsCriteria.INCLUDE_HOT
.
DirectionsCriteria.PROFILE_WALKING
: No includes supported
DirectionsCriteria.PROFILE_CYCLING
: No includes supported
include
- a string matching one of the DirectionsCriteria.IncludeCriteria
inclusions@NonNull public RouteOptions.Builder includeList(@Nullable java.util.List<java.lang.String> include)
DirectionsCriteria.PROFILE_DRIVING
: One of DirectionsCriteria.INCLUDE_HOV2
,
DirectionsCriteria.INCLUDE_HOV3
, or DirectionsCriteria.INCLUDE_HOT
.
DirectionsCriteria.PROFILE_DRIVING_TRAFFIC
: One of
DirectionsCriteria.INCLUDE_HOV2
, DirectionsCriteria.INCLUDE_HOV3
, or
DirectionsCriteria.INCLUDE_HOT
.
DirectionsCriteria.PROFILE_WALKING
: No includes supported
DirectionsCriteria.PROFILE_CYCLING
: No includes supported
include
- a list of include that were used during the request@NonNull public abstract RouteOptions.Builder approaches(@Nullable java.lang.String approaches)
DirectionsCriteria.APPROACH_UNRESTRICTED
(default) or
DirectionsCriteria.APPROACH_CURB
.
If set to DirectionsCriteria.APPROACH_UNRESTRICTED
, the route can approach waypoints
from either side of the road.
If set to DirectionsCriteria.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.
However, you can skip a coordinate and show its position in the list with the ; separator.
Since the first value will not be evaluated, begin the list with a semicolon.
If the waypoint is within 1 meter of the road, this parameter is ignored.approaches
- a string representing approaches for each waypoint@NonNull public RouteOptions.Builder approachesList(@Nullable java.util.List<java.lang.String> approaches)
DirectionsCriteria.APPROACH_UNRESTRICTED
(default) or
DirectionsCriteria.APPROACH_CURB
.
If set to DirectionsCriteria.APPROACH_UNRESTRICTED
, the route can approach waypoints
from either side of the road.
If set to DirectionsCriteria.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.
However, you can skip a coordinate and show its position in the list with null.
Since the first value will not be evaluated, you can begin the list with a null.
If the waypoint is within 1 meter of the road, this parameter is ignored.approaches
- a list of strings representing approaches for each waypoint@NonNull public abstract RouteOptions.Builder waypointIndices(@Nullable java.lang.String waypointIndices)
Waypoints form the beginning and end of each leg in the returned route and correspond to the depart and arrive steps. If a list of waypoints is not provided, all coordinates are treated as waypoints. Each item in the list must be the zero-based index of an input coordinate, and the list must include 0 (the index of the first coordinate) and the index of the last coordinate. The waypoints parameter can be used to guide the path of the route without introducing additional legs and arrive/depart instructions.
For example, if a coordinates list has 3 points, origin, some middle point, and destination, we can have below combinations:
- waypointIndices are null, the route will have 2 legs
- waypointIndices are "0;1;2", the route will have 2 legs
- waypointIndices are "0;2", the route will have only one leg that goes via the middle point
Must be used with RouteOptions.steps()
=true.
waypointIndices
- a string representing indices to be used as waypoints@NonNull public RouteOptions.Builder waypointIndicesList(@Nullable java.util.List<java.lang.Integer> indices)
Waypoints form the beginning and end of each leg in the returned route and correspond to the depart and arrive steps. If a list of waypoints is not provided, all coordinates are treated as waypoints. Each item in the list must be the zero-based index of an input coordinate, and the list must include 0 (the index of the first coordinate) and the index of the last coordinate. The waypoints parameter can be used to guide the path of the route without introducing additional legs and arrive/depart instructions.
For example, if a coordinates list has 3 points, origin, some middle point, and destination, we can have below combinations:
- waypointIndices are null, the route will have 2 legs
- waypointIndices are [0,1,2], the route will have 2 legs
- waypointIndices are [0,2], the route will have only one leg that goes via the middle point
Must be used with RouteOptions.steps()
=true.
indices
- a List of Integers representing indices to be used as waypoints@NonNull public abstract RouteOptions.Builder waypointNames(@Nullable java.lang.String waypointNames)
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
500. If provided, the list of waypoint_names must be the same length as the list of
coordinates. The first value in the list corresponds to the route origin, not the first
destination.
To leave the origin unnamed, begin the list with a semicolon.
Must be used in conjunction with RouteOptions.steps()
=true.waypointNames
- a string representing names for each waypoint@NonNull public RouteOptions.Builder waypointNamesList(@Nullable java.util.List<java.lang.String> waypointNames)
RouteOptions.coordinatesList()
, used for the arrival instruction in banners and voice
instructions. Values can be any string, and the total number of all characters cannot exceed
500. If provided, the list of names must be the same length as the list of
coordinates. The first value in the list corresponds to the route origin, not the first
destination.
Must be used in conjunction with RouteOptions.steps()
=true.
waypointNames
- a list of strings representing names for each waypoint@NonNull public abstract RouteOptions.Builder waypointTargets(@Nullable java.lang.String waypointTargets)
Must be used with RouteOptions.steps()
=true.
waypointTargets
- a list of Points representing coordinate pairs for drop-off locations@NonNull public RouteOptions.Builder waypointTargetsList(@Nullable java.util.List<com.mapbox.geojson.Point> waypointTargets)
RouteOptions.steps()
=true.waypointTargets
- a list of Points representing coordinate pairs for drop-off locations@NonNull public abstract RouteOptions.Builder alleyBias(@Nullable java.lang.Double alleyBias)
alleyBias
- bias towards alleys@NonNull public abstract RouteOptions.Builder walkingSpeed(@Nullable java.lang.Double walkingSpeed)
Only available with the DirectionsCriteria.PROFILE_WALKING
.
walkingSpeed
- in meters per second@NonNull public abstract RouteOptions.Builder walkwayBias(@Nullable java.lang.Double walkwayBias)
Only available with the DirectionsCriteria.PROFILE_WALKING
.
walkwayBias
- bias to prefer or avoid walkways@NonNull public abstract RouteOptions.Builder snappingIncludeClosures(@Nullable java.lang.String snappingClosures)
Only available with the DirectionsCriteria.PROFILE_DRIVING_TRAFFIC
.
snappingClosures
- a String representing a list of booleans@NonNull public RouteOptions.Builder snappingIncludeClosuresList(@Nullable java.util.List<java.lang.Boolean> snappingClosures)
Only available with the DirectionsCriteria.PROFILE_DRIVING_TRAFFIC
.
snappingClosures
- a list of booleans@NonNull public abstract RouteOptions.Builder snappingIncludeStaticClosures(@Nullable java.lang.String snappingStaticClosures)
Only available with the DirectionsCriteria.PROFILE_DRIVING_TRAFFIC
.
snappingStaticClosures
- a String representing a list of booleans@NonNull public RouteOptions.Builder snappingIncludeStaticClosuresList(@Nullable java.util.List<java.lang.Boolean> snappingStaticClosures)
Only available with the DirectionsCriteria.PROFILE_DRIVING_TRAFFIC
.
snappingStaticClosures
- a list of booleans@NonNull public abstract RouteOptions.Builder arriveBy(@Nullable java.lang.String arriveBy)
Only available with the DirectionsCriteria.PROFILE_DRIVING
.
arriveBy
- arrive time ISO8601, see FormatUtils.ISO_8601_PATTERN
@NonNull public abstract RouteOptions.Builder departAt(@Nullable java.lang.String departAt)
Only available with the DirectionsCriteria.PROFILE_DRIVING
.
departAt
- departure time ISO8601, see FormatUtils.ISO_8601_PATTERN
@NonNull public abstract RouteOptions.Builder maxHeight(@Nullable java.lang.Double maxHeight)
Available for DirectionsCriteria.PROFILE_DRIVING_TRAFFIC
and
DirectionsCriteria.PROFILE_DRIVING
.
maxHeight
- max vehicle height, in meters. Must be between 0 and 10.@NonNull public abstract RouteOptions.Builder maxWidth(@Nullable java.lang.Double maxWidth)
Available for DirectionsCriteria.PROFILE_DRIVING_TRAFFIC
and
DirectionsCriteria.PROFILE_DRIVING
.
maxWidth
- max vehicle width, in meters. Must be between 0 and 10.@NonNull public abstract RouteOptions.Builder maxWeight(@Nullable java.lang.Double maxWeight)
The default value is 2.5 metric tons.
maxWeight
- max vehicle weight, in tons. Must be between 0 and 100.@NonNull public abstract RouteOptions.Builder enableRefresh(@Nullable java.lang.Boolean enableRefresh)
If false, the refresh requests will fail. Defaults to false if null.
enableRefresh
- whether the routes should be refreshable@NonNull public abstract RouteOptions.Builder computeTollCost(@Nullable java.lang.Boolean computeTollCost)
@NonNull public abstract RouteOptions.Builder waypointsPerRoute(@Nullable java.lang.Boolean waypointsPerRoute)
waypointsPerRoute
- boolean representing the `waypoints_per_route` value@NonNull public abstract RouteOptions.Builder metadata(@Nullable java.lang.Boolean metadata)
metadata
- whether the routes should be refreshable@NonNull public abstract RouteOptions.Builder suppressVoiceInstructionLocalNames(@Nullable java.lang.Boolean suppressVoiceInstructionLocalNames)
@NonNull public RouteOptions.Builder unrecognizedProperties(@Nullable java.util.Map<java.lang.String,java.lang.String> unrecognizedProperties)
unrecognizedProperties
- parameters to add to request@NonNull public abstract RouteOptions.Builder paymentMethods(@Nullable java.lang.String paymentMethods)
@NonNull public RouteOptions.Builder paymentMethodsList(@Nullable java.util.List<java.lang.String> paymentMethods)
@NonNull public abstract RouteOptions build()
RouteOptions
@NonNull public T unrecognizedJsonProperties(@Nullable java.util.Map<java.lang.String,com.google.gson.JsonElement> unrecognizedProperties)
unrecognizedProperties
- parameters to add to request