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

java.lang.Object
  extended by com.google.gwt.maps.client.geocode.DirectionResults

public final class DirectionResults
extends java.lang.Object

This class provides encapsulation for the JavaScript Maps API GDirections methods that should be used after a query successfully returns.


Method Summary
 void clear()
          Clears any existing directions results, removes overlays from the map and panel, and cancels any pending load() requests.
 LatLngBounds getBounds()
          This method is used to get the bounding box for the result of this directions query.
 java.lang.String getCopyrightsHtml()
          Returns an HTML string containing the copyright information for this result.
 Distance getDistance()
          Returns an object literal representing the total distance of the directions request (across all routes).
 Duration getDuration()
          Returns an object representing the total time of the directions request (across all routes).
 java.util.List<Marker> getMarkers()
          Returns the list of Markers associated with the geocode.
 java.util.List<Placemark> getPlacemarks()
          Returns the list of the geocoded results.
 Polyline getPolyline()
          Returns the Polyline object associated with the entire directions response.
 java.util.List<Route> getRoutes()
          Returns the list of Route objects in the response.
 java.lang.String getSummaryHtml()
          Returns an HTML snippet containing a summary of the distance and time for this entire directions request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clear

public void clear()
Clears any existing directions results, removes overlays from the map and panel, and cancels any pending load() requests.


getBounds

public LatLngBounds getBounds()
This method is used to get the bounding box for the result of this directions query. Returns a LatLngBounds object or null if no successful result is available.

Returns:
the bounding box for the result of the directions query.

getCopyrightsHtml

public java.lang.String getCopyrightsHtml()
Returns an HTML string containing the copyright information for this result.

Returns:
an HTML string containing the copyright information for this result.

getDistance

public Distance getDistance()
Returns an object literal representing the total distance of the directions request (across all routes).

Returns:
The distance including number of meters and localized string representation of the distance in localized units.

getDuration

public Duration getDuration()
Returns an object representing the total time of the directions request (across all routes).

Returns:
the estimated travel time in seconds and in a string version containing a localized representation of the time.

getMarkers

public java.util.List<Marker> getMarkers()
Returns the list of Markers associated with the geocode.

Returns:
the list of Markers associated with the geocode.

getPlacemarks

public java.util.List<Placemark> getPlacemarks()
Returns the list of the geocoded results.

Returns:
list of the geocoded results.

getPolyline

public Polyline getPolyline()
Returns the Polyline object associated with the entire directions response. Note that there is a single polyline that represents all the routes in the response.

Returns:
the Polyline object associated with the entire directions response.

getRoutes

public java.util.List<Route> getRoutes()
Returns the list of Route objects in the response.

Returns:
the list of Route objects in the response.

getSummaryHtml

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

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