public class DirectionsLeg extends MapObject
Modifier and Type | Class and Description |
---|---|
protected static class |
DirectionsLeg.ArrayProperty |
Constructor and Description |
---|
DirectionsLeg()
Creates new DirectionsLeg object
|
DirectionsLeg(Map map)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Time |
getArrivalTime()
Returns value of arrivalTime property.
|
Time |
getDepartureTime()
Returns value of departureTime property.
|
Distance |
getDistance()
Returns value of distance property.
|
Duration |
getDuration()
Returns value of duration property.
|
Duration |
getDurationInTraffic()
Returns value of durationInTraffic property.
|
java.lang.String |
getEndAddress()
Returns value of endAddress property.
|
LatLng |
getEndLocation()
Returns value of endLocation property.
|
java.lang.String |
getStartAddress()
Returns value of startAddress property.
|
LatLng |
getStartLocation()
Returns value of startLocation property.
|
DirectionsStep[] |
getSteps()
Returns value of steps property.
|
LatLng[] |
getViaWaypoints()
Returns value of viaWaypoints property.
|
void |
setArrivalTime(Time value)
Sets new value for arrivalTime property.
|
void |
setDepartureTime(Time value)
Sets new value for departureTime property.
|
void |
setDistance(Distance value)
Sets new value for distance property.
|
void |
setDuration(Duration value)
Sets new value for duration property.
|
void |
setDurationInTraffic(Duration value)
Sets new value for durationInTraffic property.
|
void |
setEndAddress(java.lang.String value)
Sets new value for endAddress property.
|
void |
setEndLocation(LatLng value)
Sets new value for endLocation property.
|
void |
setStartAddress(java.lang.String value)
Sets new value for startAddress property.
|
void |
setStartLocation(LatLng value)
Sets new value for startLocation property.
|
void |
setSteps(DirectionsStep[] steps)
Sets new value for steps property.
|
void |
setViaWaypoints(LatLng[] waypoints)
Sets new value for viaWaypoints property.
|
addEventListener, attachObject, cacheProperties, cacheProperties, clone, createJSValue, dispose, fromJSValue, getJSObject, getMap, getProperties, invokeMethod, propertyChanged, removeEventListener, updateProperty
public DirectionsLeg()
@Deprecated public DirectionsLeg(Map map)
map
- owner Map objectpublic Time getArrivalTime()
Represents an estimated arrival time for this leg. Only applicable for TRANSIT requests.
setArrivalTime(com.teamdev.jxmaps.Time)
public void setArrivalTime(Time value)
value
- new property valuegetArrivalTime()
public Time getDepartureTime()
Represents an estimated departure time for this leg. Only applicable for TRANSIT requests.
setDepartureTime(com.teamdev.jxmaps.Time)
public void setDepartureTime(Time value)
value
- new property valuegetDepartureTime()
public Distance getDistance()
Represents the total distance covered by this leg. This property may be undefined as the distance may be unknown.
setDistance(com.teamdev.jxmaps.Distance)
public void setDistance(Distance value)
value
- new property valuegetDistance()
public Duration getDuration()
Represents the total duration of this leg. This property may be undefined as the duration may be unknown.
setDuration(com.teamdev.jxmaps.Duration)
public void setDuration(Duration value)
value
- new property valuegetDuration()
public Duration getDurationInTraffic()
Represents the total duration of this leg, taking into account current traffic conditions. This property may be undefined as the duration may be unknown. Only available to Maps API for Work customers when durationInTraffic is set to true when making the request.
setDurationInTraffic(com.teamdev.jxmaps.Duration)
public void setDurationInTraffic(Duration value)
value
- new property valuegetDurationInTraffic()
public java.lang.String getEndAddress()
Represents the address of the destination of this leg.
setEndAddress(java.lang.String)
public void setEndAddress(java.lang.String value)
value
- new property valuegetEndAddress()
public LatLng getEndLocation()
The DirectionsService calculates directions between locations by using the nearest transportation option (usually a road) at the start and end locations. end_location indicates the actual geocoded destination, which may be different than the end_location of the last step if, for example, the road is not near the destination of this leg.
setEndLocation(com.teamdev.jxmaps.LatLng)
public void setEndLocation(LatLng value)
value
- new property valuegetEndLocation()
public java.lang.String getStartAddress()
Represents the address of the origin of this leg.
setStartAddress(java.lang.String)
public void setStartAddress(java.lang.String value)
value
- new property valuegetStartAddress()
public LatLng getStartLocation()
The DirectionsService calculates directions between locations by using the nearest transportation option (usually a road) at the start and end locations. start_location indicates the actual geocoded origin, which may be different than the start_location of the first step if, for example, the road is not near the origin of this leg.
setStartLocation(com.teamdev.jxmaps.LatLng)
public void setStartLocation(LatLng value)
value
- new property valuegetStartLocation()
public DirectionsStep[] getSteps()
Represents a collection of DirectionsSteps, each of which contains information about the individual steps in this leg.
setSteps(com.teamdev.jxmaps.DirectionsStep[])
public void setSteps(DirectionsStep[] steps)
steps
- new property valuegetSteps()
public LatLng[] getViaWaypoints()
Represents a collection of waypoints along this leg that were not specified in the original request, either as a result of a user dragging the polyline or selecting an alternate route.
setViaWaypoints(com.teamdev.jxmaps.LatLng[])
public void setViaWaypoints(LatLng[] waypoints)
waypoints
- new property valuegetViaWaypoints()