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.SerializableA 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 Distancedistancedistanceindicates the total distance covered by this leg.DurationdurationThe total duration of this leg.DurationdurationInTrafficThe length of time to travel this route, based on current and historical traffic conditions.Farefarefarecontains information about the fare (that is, the ticket costs) on this route.DistanceMatrixElementStatusstatusThe 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.StringtoString()
-
-
-
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
distanceindicates the total distance covered by this leg.
-
fare
public Fare fare
farecontains information about the fare (that is, the ticket costs) on this route.
-
-