com.google.maps.gwt.client
Class DirectionsLeg

java.lang.Object
  extended by JavaScriptObject
      extended by com.google.maps.gwt.client.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. THIS SOURCE CODE IS GENERATED, DO NOT MODIFY


Constructor Summary
protected DirectionsLeg()
          Protected constructor avoids default public constructor.
 
Method Summary
 Distance getDistance()
          The total distance covered by this leg.
 Duration getDuration()
          The total duration of this leg.
 java.lang.String getEndAddress()
          The address of the destination of this leg.
 LatLng getEndLocation()
          The DirectionsService calculates directions between locations by using the nearest transportation option (usually a road) at the start and end locations.
 java.lang.String getStartAddress()
          The address of the origin of this leg.
 LatLng getStartLocation()
          The DirectionsService calculates directions between locations by using the nearest transportation option (usually a road) at the start and end locations.
  getSteps()
          An array of DirectionsStep s, each of which contains information about the individual steps in this leg.
  getViaWaypoints()
          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.
 void setDistance(Distance distance)
          The total distance covered by this leg.
 void setDuration(Duration duration)
          The total duration of this leg.
 void setEndAddress(java.lang.String end_address)
          The address of the destination of this leg.
 void setEndLocation(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 setStartAddress(java.lang.String start_address)
          The address of the origin of this leg.
 void setStartLocation(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( steps)
          An array of DirectionsStep s, each of which contains information about the individual steps in this leg.
 void setViaWaypoints( 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectionsLeg

protected DirectionsLeg()
Protected constructor avoids default public constructor.

Method Detail

getDistance

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


getDuration

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


getEndAddress

public final java.lang.String getEndAddress()
The address of the destination of this leg.


getEndLocation

public final 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.


getStartAddress

public final java.lang.String getStartAddress()
The address of the origin of this leg.


getStartLocation

public final 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.


getSteps

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


getViaWaypoints

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


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.


setDuration

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


setEndAddress

public final void setEndAddress(java.lang.String end_address)
The address of the destination of this leg.


setEndLocation

public final void setEndLocation(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.


setStartAddress

public final void setStartAddress(java.lang.String start_address)
The address of the origin of this leg.


setStartLocation

public final void setStartLocation(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.


setSteps

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


setViaWaypoints

public final void setViaWaypoints( 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.