public static interface Leg.Builder extends SdkPojo, CopyableBuilder<Leg.Builder,Leg>
| Modifier and Type | Method and Description |
|---|---|
Leg.Builder |
distance(Double distance)
The distance between the leg's
StartPosition and EndPosition along a calculated
route. |
Leg.Builder |
durationSeconds(Double durationSeconds)
The estimated travel time between the leg's
StartPosition and EndPosition. |
Leg.Builder |
endPosition(Collection<Double> endPosition)
The terminating position of the leg.
|
Leg.Builder |
endPosition(Double... endPosition)
The terminating position of the leg.
|
default Leg.Builder |
geometry(Consumer<LegGeometry.Builder> geometry)
Contains the calculated route's path as a linestring geometry.
|
Leg.Builder |
geometry(LegGeometry geometry)
Contains the calculated route's path as a linestring geometry.
|
Leg.Builder |
startPosition(Collection<Double> startPosition)
The starting position of the leg.
|
Leg.Builder |
startPosition(Double... startPosition)
The starting position of the leg.
|
Leg.Builder |
steps(Collection<Step> steps)
Contains a list of steps, which represent subsections of a leg.
|
Leg.Builder |
steps(Consumer<Step.Builder>... steps)
Contains a list of steps, which represent subsections of a leg.
|
Leg.Builder |
steps(Step... steps)
Contains a list of steps, which represent subsections of a leg.
|
equalsBySdkFields, sdkFieldscopyapplyMutation, buildLeg.Builder distance(Double distance)
The distance between the leg's StartPosition and EndPosition along a calculated
route.
The default measurement is Kilometers unless the request specifies a DistanceUnit
of Miles.
distance - The distance between the leg's StartPosition and EndPosition along a
calculated route.
The default measurement is Kilometers unless the request specifies a
DistanceUnit of Miles.
Leg.Builder durationSeconds(Double durationSeconds)
The estimated travel time between the leg's StartPosition and EndPosition. The
travel mode and departure time that you specify in the request determines the calculated time.
durationSeconds - The estimated travel time between the leg's StartPosition and EndPosition.
The travel mode and departure time that you specify in the request determines the calculated time.Leg.Builder endPosition(Collection<Double> endPosition)
The terminating position of the leg. Follows the format [longitude,latitude].
If the EndPosition isn't located on a road, it's snapped to a nearby
road.
endPosition - The terminating position of the leg. Follows the format [longitude,latitude].
If the EndPosition isn't located on a road, it's snapped to a
nearby road.
Leg.Builder endPosition(Double... endPosition)
The terminating position of the leg. Follows the format [longitude,latitude].
If the EndPosition isn't located on a road, it's snapped to a nearby
road.
endPosition - The terminating position of the leg. Follows the format [longitude,latitude].
If the EndPosition isn't located on a road, it's snapped to a
nearby road.
Leg.Builder geometry(LegGeometry geometry)
Contains the calculated route's path as a linestring geometry.
geometry - Contains the calculated route's path as a linestring geometry.default Leg.Builder geometry(Consumer<LegGeometry.Builder> geometry)
Contains the calculated route's path as a linestring geometry.
This is a convenience method that creates an instance of theLegGeometry.Builder avoiding the need to
create one manually via LegGeometry.builder().
When the Consumer completes, SdkBuilder.build() is called immediately and its result
is passed to geometry(LegGeometry).geometry - a consumer that will call methods on LegGeometry.Buildergeometry(LegGeometry)Leg.Builder startPosition(Collection<Double> startPosition)
The starting position of the leg. Follows the format [longitude,latitude].
If the StartPosition isn't located on a road, it's snapped to a
nearby road.
startPosition - The starting position of the leg. Follows the format [longitude,latitude].
If the StartPosition isn't located on a road, it's snapped to
a nearby road.
Leg.Builder startPosition(Double... startPosition)
The starting position of the leg. Follows the format [longitude,latitude].
If the StartPosition isn't located on a road, it's snapped to a
nearby road.
startPosition - The starting position of the leg. Follows the format [longitude,latitude].
If the StartPosition isn't located on a road, it's snapped to
a nearby road.
Leg.Builder steps(Collection<Step> steps)
Contains a list of steps, which represent subsections of a leg. Each step provides instructions for how to move to the next step in the leg such as the step's start position, end position, travel distance, travel duration, and geometry offset.
steps - Contains a list of steps, which represent subsections of a leg. Each step provides instructions for
how to move to the next step in the leg such as the step's start position, end position, travel
distance, travel duration, and geometry offset.Leg.Builder steps(Step... steps)
Contains a list of steps, which represent subsections of a leg. Each step provides instructions for how to move to the next step in the leg such as the step's start position, end position, travel distance, travel duration, and geometry offset.
steps - Contains a list of steps, which represent subsections of a leg. Each step provides instructions for
how to move to the next step in the leg such as the step's start position, end position, travel
distance, travel duration, and geometry offset.Leg.Builder steps(Consumer<Step.Builder>... steps)
Contains a list of steps, which represent subsections of a leg. Each step provides instructions for how to move to the next step in the leg such as the step's start position, end position, travel distance, travel duration, and geometry offset.
This is a convenience method that creates an instance of theList.Builder avoiding the need to
create one manually via List#builder() .
When the Consumer completes, List.Builder#build() is called immediately and its result
is passed to #steps(List) .steps - a consumer that will call methods on List.Builder #steps(List) Copyright © 2022. All rights reserved.