Packagecom.google.maps.services
Classpublic class DirectionsOptions

DirectionsOptions specifies properties for configuring Directions instances.



Public Properties
 PropertyDefined by
  avoidHighways : Object
A Boolean value that determines whether or not to attempt to exclude highways when forming the directions.
DirectionsOptions
  countryCode : String
The countryCode for directions queries.
DirectionsOptions
  language : String
The language for directions queries.
DirectionsOptions
  travelMode : Object
The travel mode for directions queries.
DirectionsOptions
Public Methods
 MethodDefined by
  
DirectionsOptions(param:Object = null)
Constructs a new DirectionsOptions object, optionally initializing it from an object.
DirectionsOptions
  
toString():String
Returns a String representation of this object.
DirectionsOptions
Public Constants
 ConstantDefined by
  TRAVEL_MODE_DRIVING : uint = 0
[static] Designates driving travel mode for the directions.
DirectionsOptions
  TRAVEL_MODE_WALKING : uint = 1
[static] Designates walking travel mode for the directions.
DirectionsOptions
Property detail
avoidHighwaysproperty
avoidHighways:Object  [read-write]

A Boolean value that determines whether or not to attempt to exclude highways when forming the directions.

Implementation
    public function get avoidHighways():Object
    public function set avoidHighways(value:Object):void
countryCodeproperty 
countryCode:String  [read-write]

The countryCode for directions queries. This is specified as a standard two-letter country code, for example "US", "DE". When omitted, Map.countryCode will be used if set.

Implementation
    public function get countryCode():String
    public function set countryCode(value:String):void
languageproperty 
language:String  [read-write]

The language for directions queries. This is specified as a standard two letter language code, for example "en", "fr". When omitted, Map.language will be used if set; otherwise the browser's preferred language setting is used.

Implementation
    public function get language():String
    public function set language(value:String):void
travelModeproperty 
travelMode:Object  [read-write]

The travel mode for directions queries. This value affects the directions response, as directions will be modified to fit the requested travel mode. It should be one of {TRAVEL_MODE_DRIVING, TRAVEL_MODE_WALKING}.

Implementation
    public function get travelMode():Object
    public function set travelMode(value:Object):void
Constructor detail
DirectionsOptions()constructor
public function DirectionsOptions(param:Object = null)

Constructs a new DirectionsOptions object, optionally initializing it from an object.

Parameters
param:Object (default = null) — An initialization object containing a set of values that supplement the default set.

Example
   var options:DirectionsOptions = new DirectionsOptions({
     language: 'en',
     countryCode: 'US',
     travelMode: DirectionsOptions.TRAVEL_MODE_DRIVING
   });

Method detail
toString()method
public function toString():String

Returns a String representation of this object.

Returns
String — String representation of this object.
Constant detail
TRAVEL_MODE_DRIVINGconstant
public static const TRAVEL_MODE_DRIVING:uint = 0

Designates driving travel mode for the directions.

TRAVEL_MODE_WALKINGconstant 
public static const TRAVEL_MODE_WALKING:uint = 1

Designates walking travel mode for the directions.