Follow us on GitHub

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

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

public class DirectionsRequest
extends JavaScriptObject

A directions query to be sent to the DirectionsService.

See DirectionsRequest API Doc


Constructor Summary
protected DirectionsRequest()
          use newInstance();
 
Method Summary
 boolean getAvoidHighways()
          If true, instructs the Directions service to avoid highways where possible.
 boolean getAvoidTolls()
          If true, instructs the Directions service to avoid toll roads where possible.
 LatLng getDestination_LatLng()
          Location of destination.
 String getDestination_String()
          Location of destination.
 boolean getOptimizeWaypoints()
          If set to true, the DirectionService will attempt to re-order the supplied intermediate waypoints to minimize overall cost of the route.
 LatLng getOrigin_LatLng()
          Location of origin.
 String getOrigin_String()
          Location of origin.
 boolean getProvideRouteAlternatives()
          Whether or not route alternatives should be provided.
 String getRegion()
          Region code used as a bias for geocoding requests.
 TravelMode getTravelMode()
          Type of routing requested.
 UnitSystem getUnitSystem()
          Preferred unit system to use when displaying distance.
 JsArray<DirectionsWaypoint> getWaypoints()
          Array of intermediate waypoints.
static DirectionsRequest newInstance()
          A directions query to be sent to the DirectionsService.
 void setAvoidHighways(boolean avoidHighways)
          If true, instructs the Directions service to avoid highways where possible.
 void setAvoidTolls(boolean avoidTolls)
          If true, instructs the Directions service to avoid toll roads where possible.
 void setDestination(LatLng destination)
          Location of destination.
 void setDestination(String destination)
          Location of destination.
 void setOptimizeWaypoints(boolean optimizeWaypoints)
          If set to true, the DirectionService will attempt to re-order the supplied intermediate waypoints to minimize overall cost of the route.
 void setOrigin(LatLng origin)
          Location of origin.
 void setOrigin(String origin)
          Location of origin.
 void setProvideRouteAlternatives(boolean provideRouteAlternatives)
          Whether or not route alternatives should be provided.
 void setRegion(String region)
          Region code used as a bias for geocoding requests.
 void setTravelMode(TravelMode travelMode)
          Type of routing requested.
 void setUnitSystem(UnitSystem unitSystem)
          Preferred unit system to use when displaying distance.
 void setWaypoints(JsArray<DirectionsWaypoint> waypoints)
          Array of intermediate 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

DirectionsRequest

protected DirectionsRequest()
use newInstance();

Method Detail

newInstance

public static final DirectionsRequest newInstance()
A directions query to be sent to the DirectionsService.


setAvoidHighways

public final void setAvoidHighways(boolean avoidHighways)
If true, instructs the Directions service to avoid highways where possible. Optional.

Parameters:
avoidHighways -

getAvoidHighways

public final boolean getAvoidHighways()
If true, instructs the Directions service to avoid highways where possible. Optional.


setAvoidTolls

public final void setAvoidTolls(boolean avoidTolls)
If true, instructs the Directions service to avoid toll roads where possible. Optional.

Parameters:
avoidTolls -

getAvoidTolls

public final boolean getAvoidTolls()
If true, instructs the Directions service to avoid toll roads where possible. Optional.


setDestination

public final void setDestination(String destination)
Location of destination. This can be specified as either a string to be geocoded or a LatLng. Required.

Parameters:
destination -

getDestination_String

public final String getDestination_String()
Location of destination. This can be specified as either a string to be geocoded or a LatLng.


setDestination

public final void setDestination(LatLng destination)
Location of destination. This can be specified as either a string to be geocoded or a LatLng. Required.

Parameters:
destination -

getDestination_LatLng

public final LatLng getDestination_LatLng()
Location of destination. This can be specified as either a string to be geocoded or a LatLng.


setOptimizeWaypoints

public final void setOptimizeWaypoints(boolean optimizeWaypoints)
If set to true, the DirectionService will attempt to re-order the supplied intermediate waypoints to minimize overall cost of the route. If waypoints are optimized, inspect DirectionsRoute.waypoint_order in the response to determine the new ordering.

Parameters:
optimizeWaypoints -

getOptimizeWaypoints

public final boolean getOptimizeWaypoints()
If set to true, the DirectionService will attempt to re-order the supplied intermediate waypoints to minimize overall cost of the route. If waypoints are optimized, inspect DirectionsRoute.waypoint_order in the response to determine the new ordering.


setOrigin

public final void setOrigin(String origin)
Location of origin. This can be specified as either a string to be geocoded or a LatLng. Required.

Parameters:
origin -

getOrigin_String

public final String getOrigin_String()
Location of origin. This can be specified as either a string to be geocoded or a LatLng.


setOrigin

public final void setOrigin(LatLng origin)
Location of origin. This can be specified as either a string to be geocoded or a LatLng. Required.

Parameters:
origin -

getOrigin_LatLng

public final LatLng getOrigin_LatLng()
Location of origin. This can be specified as either a string to be geocoded or a LatLng.


setProvideRouteAlternatives

public final void setProvideRouteAlternatives(boolean provideRouteAlternatives)
Whether or not route alternatives should be provided. Optional.

Parameters:
provideRouteAlternatives -

getProvideRouteAlternatives

public final boolean getProvideRouteAlternatives()
Whether or not route alternatives should be provided. Optional.


setRegion

public final void setRegion(String region)
Region code used as a bias for geocoding requests. Optional.

Parameters:
region -

getRegion

public final String getRegion()
Region code used as a bias for geocoding requests. Optional.


setTravelMode

public final void setTravelMode(TravelMode travelMode)
Type of routing requested. Required.

Parameters:
travelMode -

getTravelMode

public final TravelMode getTravelMode()
Type of routing requested. Required.


setUnitSystem

public final void setUnitSystem(UnitSystem unitSystem)
Preferred unit system to use when displaying distance. Defaults to the unit system used in the country of origin.

Parameters:
unitSystem -

getUnitSystem

public final UnitSystem getUnitSystem()
Preferred unit system to use when displaying distance. Defaults to the unit system used in the country of origin.


setWaypoints

public final void setWaypoints(JsArray<DirectionsWaypoint> waypoints)
Array of intermediate waypoints. Directions will be calculated from the origin to the destination by way of each waypoint in this array. Optional.

Parameters:
waypoints -

getWaypoints

public final JsArray<DirectionsWaypoint> getWaypoints()
Array of intermediate waypoints. Directions will be calculated from the origin to the destination by way of each waypoint in this array. Optional.



Follow us on GitHub

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