Package com.google.maps.model
Class DistanceMatrixElement
- java.lang.Object
-
- com.google.maps.model.DistanceMatrixElement
-
- All Implemented Interfaces:
java.io.Serializable
public class DistanceMatrixElement extends java.lang.Object implements java.io.Serializable
A single result corresponding to an origin/destination pair in a Distance Matrix response.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.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description Distance
distance
distance
indicates the total distance covered by this leg.Duration
duration
The total duration of this leg.Duration
durationInTraffic
The length of time to travel this route, based on current and historical traffic conditions.Fare
fare
fare
contains information about the fare (that is, the ticket costs) on this route.DistanceMatrixElementStatus
status
The status of the request for this origin/destination pair.
-
Constructor Summary
Constructors Constructor Description DistanceMatrixElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
toString()
-
-
-
Field Detail
-
status
public DistanceMatrixElementStatus status
The status of the request for this origin/destination pair.Will be one of
DistanceMatrixElementStatus
.
-
duration
public Duration duration
The total duration of this leg.
-
durationInTraffic
public Duration durationInTraffic
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:- The request includes a departureTime parameter.
- The request includes a valid API key or a valid Google Maps APIs Premium Plan client ID and signature.
- Traffic conditions are available for the requested route.
- The mode parameter is set to driving.
-
distance
public Distance distance
distance
indicates the total distance covered by this leg.
-
fare
public Fare fare
fare
contains information about the fare (that is, the ticket costs) on this route.
-
-