public class DirectionsLeg
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
org.joda.time.DateTime |
arrivalTime
arrivalTime contains the estimated time of arrival for this leg. |
org.joda.time.DateTime |
departureTime
departureTime contains the estimated time of departure for this leg. |
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 total duration of this leg, taking into account current
traffic conditions. |
java.lang.String |
endAddress
endAddress contains the human-readable address (typically a street address) reflecting
the end location of this leg. |
LatLng |
endLocation
endLocation contains the latitude/longitude coordinates of the given destination of
this leg. |
java.lang.String |
startAddress
startAddress contains the human-readable address (typically a street address)
reflecting the start location of this leg. |
LatLng |
startLocation
startLocation contains the latitude/longitude coordinates of the origin of this leg. |
DirectionsStep[] |
steps
steps[] contains an array of steps denoting information about each separate step of the
leg of the journey. |
Constructor and Description |
---|
DirectionsLeg() |
public DirectionsStep[] steps
steps[]
contains an array of steps denoting information about each separate step of the
leg of the journey.public Distance distance
distance
indicates the total distance covered by this leg.public Duration duration
duration
indicates the total duration of this legpublic Duration durationInTraffic
durationInTraffic
indicates the total duration of this leg, taking into account current
traffic conditions. The duration in traffic will only be returned if all of the following are
true:
public org.joda.time.DateTime arrivalTime
arrivalTime
contains the estimated time of arrival for this leg. This property is only
returned for transit directions.public org.joda.time.DateTime departureTime
departureTime
contains the estimated time of departure for this leg. The departureTime
is only available for transit directions.public LatLng startLocation
startLocation
contains the latitude/longitude coordinates of the origin of this leg.
Because the Directions API calculates directions between locations by using the nearest
transportation option (usually a road) at the start and end points, startLocation may be
different than the provided origin of this leg if, for example, a road is not near the origin.public LatLng endLocation
endLocation
contains the latitude/longitude coordinates of the given destination of
this leg. Because the Directions API calculates directions between locations by using the
nearest transportation option (usually a road) at the start and end points, endLocation may be
different than the provided destination of this leg if, for example, a road is not near the
destination.public java.lang.String startAddress
startAddress
contains the human-readable address (typically a street address)
reflecting the start location of this leg.public java.lang.String endAddress
endAddress
contains the human-readable address (typically a street address) reflecting
the end location of this leg.