Follow us on GitHub

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

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

public class DistanceMatrixRequest
extends JavaScriptObject

A distance matrix query sent by the DistanceMatrixService containing arrays of origin and destination locations, and various options for computing metrics.

See DistanceMatrixRequest API Doc


Constructor Summary
protected DistanceMatrixRequest()
          use newInstance();
 
Method Summary
 boolean getAvoidHighways()
          If true, instructs the Distance Matrix service to avoid highways where possible.
 boolean getAvoidTolls()
          If true, instructs the Distance Matrix service to avoid toll roads where possible.
 JsArrayString getDestinations_Strings()
          An array containing destination address strings and/or LatLngs, to which to calculate distance and time.
 JsArray<LatLng> getDestinations()
          An array containing destination address strings and/or LatLngs, to which to calculate distance and time.
 JsArrayString getOrigins_Strings()
          An array containing origin address strings and/or LatLngs, from which to calculate distance and time.
 JsArray<LatLng> getOrigins()
          An array containing origin address strings and/or LatLngs, from which to calculate distance and time.
 String getRegion()
          Create new DistanceMatrixRequest instance
 TravelMode getTravelMode()
          Type of routing requested.
 UnitSystem getUnitSystem()
          Preferred unit system to use when displaying distance.
static DistanceMatrixRequest newInstance()
          A distance matrix query sent by the DistanceMatrixService containing arrays of origin and destination locations, and various options for computing metrics.
 void setAvoidHighways(boolean avoidHighways)
          If true, instructs the Distance Matrix service to avoid highways where possible.
 void setAvoidTolls(boolean avoidTolls)
          If true, instructs the Distance Matrix service to avoid toll roads where possible.
 void setDestinations(JsArray<LatLng> destinations)
          An array containing destination address strings and/or LatLngs, to which to calculate distance and time.
 void setDestinations(JsArrayString destinations)
          An array containing destination address strings and/or LatLngs, to which to calculate distance and time.
 void setOrigins(JsArray<LatLng> origins)
          An array containing origin address strings and/or LatLngs, from which to calculate distance and time.
 void setOrigins(JsArrayString origins)
          An array containing origin address strings and/or LatLngs, from which to calculate distance and time.
 void setRegion(String region)
          Region code used as a bias for geocoding requests.
 void setTravelMode(TravelMode travelMode)
          Region code used as a bias for geocoding requests.
 void setUnitSystem(UnitSystem unitSystem)
          Type of routing requested.
 
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

DistanceMatrixRequest

protected DistanceMatrixRequest()
use newInstance();

Method Detail

newInstance

public static final DistanceMatrixRequest newInstance()
A distance matrix query sent by the DistanceMatrixService containing arrays of origin and destination locations, and various options for computing metrics.


setAvoidHighways

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

Parameters:
avoidHighways -

getAvoidHighways

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


setAvoidTolls

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

Parameters:
avoidTolls -

getAvoidTolls

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


setDestinations

public final void setDestinations(JsArray<LatLng> destinations)
An array containing destination address strings and/or LatLngs, to which to calculate distance and time. Required.

Parameters:
destinations -

getDestinations

public final JsArray<LatLng> getDestinations()
An array containing destination address strings and/or LatLngs, to which to calculate distance and time. Required.


setDestinations

public final void setDestinations(JsArrayString destinations)
An array containing destination address strings and/or LatLngs, to which to calculate distance and time. Required.

Parameters:
destinations -

getDestinations_Strings

public final JsArrayString getDestinations_Strings()
An array containing destination address strings and/or LatLngs, to which to calculate distance and time. Required.


setOrigins

public final void setOrigins(JsArray<LatLng> origins)
An array containing origin address strings and/or LatLngs, from which to calculate distance and time. Required.

Parameters:
origins -

getOrigins

public final JsArray<LatLng> getOrigins()
An array containing origin address strings and/or LatLngs, from which to calculate distance and time. Required.


setOrigins

public final void setOrigins(JsArrayString origins)
An array containing origin address strings and/or LatLngs, from which to calculate distance and time. Required.

Parameters:
origins -

getOrigins_Strings

public final JsArrayString getOrigins_Strings()
An array containing origin address strings and/or LatLngs, from which to calculate distance and time. Required.


setRegion

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

Parameters:
region -

getRegion

public final String getRegion()
Create new DistanceMatrixRequest instance


setTravelMode

public final void setTravelMode(TravelMode travelMode)
Region code used as a bias for geocoding requests. Optional.

Parameters:
travelMode -

getTravelMode

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


setUnitSystem

public final void setUnitSystem(UnitSystem unitSystem)
Type of routing requested. Required.

Parameters:
unitSystem -

getUnitSystem

public final UnitSystem getUnitSystem()
Preferred unit system to use when displaying distance. Optional; defaults to metric.



Follow us on GitHub

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