public class DistanceMatrixElement
extends java.lang.Object
Be sure to check the status for each element, as a matrix response can have a mix of successful and failed elements depending on the connectivity of the origin and destination.
Modifier and Type | Field and Description |
---|---|
Distance |
distance
distance indicates the total distance covered by this leg. |
Duration |
duration
duration indicates the total duration of this leg |
Duration |
durationInTraffic
durationInTraffic indicates the length of time to travel this route,
based on current and historical traffic conditions. |
Fare |
fare
fare indicates the contains information about the fare (that is, the ticket costs) on
this route. |
DistanceMatrixElementStatus |
status
status indicates the status of the request for this origin/destination pair. |
Constructor and Description |
---|
DistanceMatrixElement() |
public DistanceMatrixElementStatus status
status
indicates the status of the request for this origin/destination pair.
Will be one of DistanceMatrixElementStatus
.public Duration duration
duration
indicates the total duration of this legpublic Duration durationInTraffic
durationInTraffic
indicates the length of time to travel this route,
based on current and historical traffic conditions. The duration in traffic
will only be returned if all of the following are true:
public Distance distance
distance
indicates the total distance covered by this leg.public Fare fare
fare
indicates the contains information about the fare (that is, the ticket costs) on
this route.