com.google.gwt.maps.client.geocode
Class Route

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.maps.client.geocode.Route

public class Route
extends com.google.gwt.core.client.JavaScriptObject

Created by the Directions class to store information about a single route in a directions result. Clients should not directly create objects of this class.


Constructor Summary
protected Route()
           
 
Method Summary
 Distance getDistance()
          Returns the total distance of this route.
 Duration getDuration()
          Returns the total estimated time of this route.
 Placemark getEndGeocode()
          Returns the ending point of this route.
 LatLng getEndLatLng()
          Returns a LatLng object for the last point along the polyline for this route.
 int getNumSteps()
          Returns the number of steps in this route.
 Placemark getStartGeocode()
          Returns the starting point of this route.
 Step getStep(int index)
          Returns the Step object for the ith step in this route.
 java.lang.String getSummaryHtml()
          Returns an HTML snippet containing a summary of the distance and time for this route.
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Route

protected Route()
Method Detail

getDistance

public final Distance getDistance()
Returns the total distance of this route.

Returns:
the total distance of this route.

getDuration

public final Duration getDuration()
Returns the total estimated time of this route.

Returns:
the total estimated time of this route.

getEndGeocode

public final Placemark getEndGeocode()
Returns the ending point of this route.

Returns:
the ending point of this route.
See Also:
getEndLatLng()

getEndLatLng

public final LatLng getEndLatLng()
Returns a LatLng object for the last point along the polyline for this route. Note that this point may be different from the lat,lng in getEndGeocode() because getEndLatLng() always returns a point that is snapped to the road network. There is no corresponding getStartLatLng() method because that is identical to calling Route.getStep(0).getLatLng().

Returns:
the last point along the polyline for this route.

getNumSteps

public final int getNumSteps()
Returns the number of steps in this route.

Returns:
the number of steps in this route.

getStartGeocode

public final Placemark getStartGeocode()
Returns the starting point of this route.

Returns:
the starting point of this route.
See Also:
getEndLatLng()

getStep

public final Step getStep(int index)
Returns the Step object for the ith step in this route.

Parameters:
index - The index of the step to return in the route
Returns:
the Step object for the ith step in this route

getSummaryHtml

public final java.lang.String getSummaryHtml()
Returns an HTML snippet containing a summary of the distance and time for this route.

Returns:
an HTML snippet containing a summary of the distance and time for this route.