Follow us on GitHub

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

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

public class DirectionsRoute
extends JavaScriptObject

A single route containing a set of legs in a DirectionsResult. (This object was formerly known as "DirectionsTrip".) Note that though this object is "JSON-like," it is not strictly JSON, as it directly and indirectly includes LatLng objects.

See DirectionsRoute API Doc


Constructor Summary
protected DirectionsRoute()
          use newInstance();
 
Method Summary
 LatLngBounds getBounds()
          The bounds for this route.
 String getCopyrights()
          Copyrights text to be displayed for this route.
 JsArray<DirectionsLeg> getLegs()
          An array of DirectionsLegs, each of which contains information about the steps of which it is composed.
 JsArray<LatLng> getOverview_Path()
          An array of LatLngs representing the entire course of this route.
 JsArrayString getWarnings()
          Warnings to be displayed when showing these directions.
 JsArrayInteger getWayPoint_Order()
          If optimizeWaypoints was set to true, this field will contain the re-ordered permutation of the input waypoints.
static DirectionsRoute newInstance()
          A single route containing a set of legs in a DirectionsResult.
 void setBounds(LatLngBounds bounds)
          The bounds for this route.
 void setCopyrights(String copyrights)
          Copyrights text to be displayed for this route.
 void setLegs(JsArray<DirectionsLeg> legs)
          An array of DirectionsLegs, each of which contains information about the steps of which it is composed.
 void setOverview_Path(JsArray<LatLng> overview_path)
          An array of LatLngs representing the entire course of this route.
 void setWarnings(JsArrayString warnings)
          Warnings to be displayed when showing these directions.
 void setWayPoint_Order(JsArrayInteger waypoint_order)
          If optimizeWaypoints was set to true, this field will contain the re-ordered permutation of the input waypoints.
 
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

DirectionsRoute

protected DirectionsRoute()
use newInstance();

Method Detail

newInstance

public static final DirectionsRoute newInstance()
A single route containing a set of legs in a DirectionsResult. (This object was formerly known as "DirectionsTrip".) Note that though this object is "JSON-like," it is not strictly JSON, as it directly and indirectly includes LatLng objects.


setBounds

public final void setBounds(LatLngBounds bounds)
The bounds for this route.

Parameters:
bounds -

getBounds

public final LatLngBounds getBounds()
The bounds for this route.


setCopyrights

public final void setCopyrights(String copyrights)
Copyrights text to be displayed for this route.

Parameters:
copyrights -

getCopyrights

public final String getCopyrights()
Copyrights text to be displayed for this route.


setLegs

public final void setLegs(JsArray<DirectionsLeg> legs)
An array of DirectionsLegs, each of which contains information about the steps of which it is composed. There will be one leg for each waypoint or destination specified. So a route with no waypoints will contain one DirectionsLeg and a route with one waypoint will contain two. (This property was formerly known as "routes".)

Parameters:
legs -

getLegs

public final JsArray<DirectionsLeg> getLegs()
An array of DirectionsLegs, each of which contains information about the steps of which it is composed. There will be one leg for each waypoint or destination specified. So a route with no waypoints will contain one DirectionsLeg and a route with one waypoint will contain two. (This property was formerly known as "routes".)


setOverview_Path

public final void setOverview_Path(JsArray<LatLng> overview_path)
An array of LatLngs representing the entire course of this route. The path is simplified in order to make it suitable in contexts where a small number of vertices is required (such as Static Maps API URLs).

Parameters:
overview_path -

getOverview_Path

public final JsArray<LatLng> getOverview_Path()
An array of LatLngs representing the entire course of this route. The path is simplified in order to make it suitable in contexts where a small number of vertices is required (such as Static Maps API URLs).


setWarnings

public final void setWarnings(JsArrayString warnings)
Warnings to be displayed when showing these directions.

Parameters:
warnings -

getWarnings

public final JsArrayString getWarnings()
Warnings to be displayed when showing these directions.


setWayPoint_Order

public final void setWayPoint_Order(JsArrayInteger waypoint_order)
If optimizeWaypoints was set to true, this field will contain the re-ordered permutation of the input waypoints. For example, if the input was: Origin: Los Angeles Waypoints: Dallas, Bangor, Phoenix Destination: New York and the optimized output was ordered as follows: Origin: Los Angeles Waypoints: Phoenix, Dallas, Bangor Destination: New York then this field will be an Array containing the values [2, 0, 1]. Note that the numbering of waypoints is zero-based. If any of the input waypoints has stopover set to false, this field will be empty, since route optimization is not available for such queries.

Parameters:
waypoint_order -

getWayPoint_Order

public final JsArrayInteger getWayPoint_Order()
If optimizeWaypoints was set to true, this field will contain the re-ordered permutation of the input waypoints. For example, if the input was: Origin: Los Angeles Waypoints: Dallas, Bangor, Phoenix Destination: New York and the optimized output was ordered as follows: Origin: Los Angeles Waypoints: Phoenix, Dallas, Bangor Destination: New York then this field will be an Array containing the values [2, 0, 1]. Note that the numbering of waypoints is zero-based. If any of the input waypoints has stopover set to false, this field will be empty, since route optimization is not available for such queries.



Follow us on GitHub

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