Follow us on GitHub

com.google.gwt.maps.client.services
Class DirectionsLeg

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.maps.client.services.DirectionsLeg

public class DirectionsLeg
extends JavaScriptObject

A single leg consisting of a set of steps in a DirectionsResult. Some fields in the leg may not be returned for all requests. (This object was formerly known as "DirectionsRoute".) Note that though this result is "JSON-like," it is not strictly JSON, as it directly and indirectly includes LatLng objects.

See DirectionsLeg API Doc


Constructor Summary
protected DirectionsLeg()
          use newInstance();
 
Method Summary
 Distance getDistance()
          The total distance covered by this leg.
 Duration getDuration()
          The total duration of this leg.
 String getEnd_Address()
          The address of the destination of this leg.
 LatLng getEnd_Location()
          The DirectionsService calculates directions between locations by using the nearest transportation option (usually a road) at the start and end locations.
 String getStart_Address()
          The address of the origin of this leg.
 LatLng getStart_Location()
          The DirectionsService calculates directions between locations by using the nearest transportation option (usually a road) at the start and end locations.
 JsArray<DirectionsStep> getSteps()
          An array of DirectionsSteps, each of which contains information about the individual steps in this leg.
 JsArray<LatLng> getVia_Waypoints()
          An array 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.
static DirectionsLeg newInstance()
          A single leg consisting of a set of steps in a DirectionsResult.
 void setDistance(Distance distance)
          The total distance covered by this leg.
 void setDuration(Duration duration)
          The total duration of this leg.
 void setEnd_Address(String end_address)
          The address of the destination of this leg.
 void setEnd_Location(LatLng end_location)
          The DirectionsService calculates directions between locations by using the nearest transportation option (usually a road) at the start and end locations.
 void setStart_Address(String start_address)
          The address of the origin of this leg.
 void setStart_Location(LatLng start_location)
          The DirectionsService calculates directions between locations by using the nearest transportation option (usually a road) at the start and end locations.
 void setSteps(JsArray<DirectionsStep> steps)
          An array of DirectionsSteps, each of which contains information about the individual steps in this leg.
 void setVia_Waypoints(JsArray<LatLng> via_waypoints)
          An array 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.
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectionsLeg

protected DirectionsLeg()
use newInstance();

Method Detail

newInstance

public static final DirectionsLeg newInstance()
A single leg consisting of a set of steps in a DirectionsResult. Some fields in the leg may not be returned for all requests. (This object was formerly known as "DirectionsRoute".) Note that though this result is "JSON-like," it is not strictly JSON, as it directly and indirectly includes LatLng objects.


setDistance

public final void setDistance(Distance distance)
The total distance covered by this leg. This property may be undefined as the distance may be unknown.

Parameters:
distance -

getDistance

public final Distance getDistance()
The total distance covered by this leg. This property may be undefined as the distance may be unknown.


setDuration

public final void setDuration(Duration duration)
The total duration of this leg. This property may be undefined as the duration may be unknown.

Parameters:
duration -

getDuration

public final Duration getDuration()
The total duration of this leg. This property may be undefined as the duration may be unknown.


setEnd_Address

public final void setEnd_Address(String end_address)
The address of the destination of this leg.

Parameters:
end_address -

getEnd_Address

public final String getEnd_Address()
The address of the destination of this leg.


setEnd_Location

public final void setEnd_Location(LatLng end_location)
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.

Parameters:
end_location -

getEnd_Location

public final LatLng getEnd_Location()
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.


setStart_Address

public final void setStart_Address(String start_address)
The address of the origin of this leg.

Parameters:
start_address -

getStart_Address

public final String getStart_Address()
The address of the origin of this leg.


setStart_Location

public final void setStart_Location(LatLng start_location)
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.

Parameters:
start_location -

getStart_Location

public final LatLng getStart_Location()
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.


setSteps

public final void setSteps(JsArray<DirectionsStep> steps)
An array of DirectionsSteps, each of which contains information about the individual steps in this leg.

Parameters:
steps -

getSteps

public final JsArray<DirectionsStep> getSteps()
An array of DirectionsSteps, each of which contains information about the individual steps in this leg.


setVia_Waypoints

public final void setVia_Waypoints(JsArray<LatLng> via_waypoints)
An array 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.

Parameters:
via_waypoints -

getVia_Waypoints

public final JsArray<LatLng> getVia_Waypoints()
An array 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.



Follow us on GitHub

Copyright © 2011-2012 Gone Vertical LLC. All Rights Reserved.