Package | com.google.maps.interfaces |
Interface | public interface IDirections extends IWrappableEventDispatcher, flash.events.IEventDispatcher, IWrappable |
Implementors | Directions |
Property | Defined by | ||
---|---|---|---|
bounds : LatLngBounds
[read-only]
The bounding box for the result of this directions query.
| IDirections | ||
copyrightsHtml : String [read-only] An HTML string containing the copyright information for this result.
| IDirections | ||
distance : Number [read-only] The total distance of this entire directions request in meters.
| IDirections | ||
distanceHtml : String [read-only]
The total distance of this entire directions request in a localized string
representation in the units that are predominant in the starting country
of this set of directions.
| IDirections | ||
duration : Number [read-only] The total time of this entire directions request in seconds.
| IDirections | ||
durationHtml : String [read-only]
The total time of this entire directions request in a localized string
representation.
| IDirections | ||
![]() | interfaceChain : Array
List of interfaces for wrapping this object.
| IWrappable | |
numGeocodes : uint [read-only]
The number of geocoded entries available in the result.
| IDirections | ||
numRoutes : uint [read-only]
The number of routes available in the result.
| IDirections | ||
status : uint [read-only]
The status code of the directions request.
| IDirections | ||
summaryHtml : String [read-only]
An HTML snippet containing a summary of the distance and time for this
entire directions request.
| IDirections | ||
![]() | wrapper : Object
Instance of the cross-domain wrapper for this object.
| IWrappable |
Method | Defined by | ||
---|---|---|---|
clear():void
Clears any existing directions results and cancels any pending
load() requests. | IDirections | ||
Create the Polyline object associated with the entire directions
response.
| IDirections | ||
![]() |
getBaseEventDispatcher():Object
Retrieves the base event dispatcher object that allows access to event
dispatching capability for cross-domain objects.
| IWrappableEventDispatcher | |
getGeocode(i:uint):Placemark
Return the geocoded result for the ith waypoint.
| IDirections | ||
Retrieves the directions object's options.
| IDirections | ||
Return the Route object for the ith route in the response.
| IDirections | ||
load(query:String):void
Initiates a directions request.
| IDirections | ||
setOptions(options:DirectionsOptions):void
Updates the directions options.
| IDirections |
bounds | property |
bounds:LatLngBounds
[read-only]The bounding box for the result of this directions query. This is will be null if no successful result is available.
Implementation public function get bounds():LatLngBounds
copyrightsHtml | property |
copyrightsHtml:String
[read-only]An HTML string containing the copyright information for this result.
Implementation public function get copyrightsHtml():String
distance | property |
distance:Number
[read-only]The total distance of this entire directions request in meters.
Implementation public function get distance():Number
distanceHtml | property |
distanceHtml:String
[read-only]The total distance of this entire directions request in a localized string representation in the units that are predominant in the starting country of this set of directions.
Implementation public function get distanceHtml():String
duration | property |
duration:Number
[read-only]The total time of this entire directions request in seconds.
Implementation public function get duration():Number
durationHtml | property |
durationHtml:String
[read-only]The total time of this entire directions request in a localized string representation.
Implementation public function get durationHtml():String
numGeocodes | property |
numGeocodes:uint
[read-only]The number of geocoded entries available in the result. For a successful query, this should be equal to the total number of input waypoints. When no results are available (either because no query was issued or because the previous query was unsuccessful), this will be 0.
Implementation public function get numGeocodes():uint
numRoutes | property |
numRoutes:uint
[read-only]The number of routes available in the result. For a successful query, this should be the total number of input waypoints minus 1. When no results are available (either because no query was issued or because the previous query was unsuccessful), this will be 0.
Implementation public function get numRoutes():uint
status | property |
status:uint
[read-only]The status code of the directions request. This will be 500 if no result is available.
Implementation public function get status():uint
summaryHtml | property |
summaryHtml:String
[read-only]An HTML snippet containing a summary of the distance and time for this entire directions request.
Implementation public function get summaryHtml():String
clear | () | method |
public function clear():void
Clears any existing directions results and cancels any pending
load()
requests.
createPolyline | () | method |
public function createPolyline(options:PolylineOptions = null):IPolyline
Create the Polyline object associated with the entire directions response. Note that there is a single polyline that represents all routes in the response. This object can be created only after the directions results have been loaded (i.e. the "load" event has been triggered).
Parametersoptions:PolylineOptions (default = null ) — Options for the creation of the polyline.
|
IPolyline —
The Polyline object that represents the directions requested.
|
See also
getGeocode | () | method |
public function getGeocode(i:uint):Placemark
Return the geocoded result for the ith waypoint.
Parametersi:uint — The index of the geocoded result to return. This should be in the
range 0 to numGeocodes - 1 , inclusive.
|
Placemark —
The Placemark object representing the ith geocoded result
in the response.
|
See also
getOptions | () | method |
public function getOptions():DirectionsOptions
Retrieves the directions object's options. Use the setOptions() method to modify directions object's options.
ReturnsDirectionsOptions —
Full set of options for the directions object.
|
getRoute | () | method |
public function getRoute(i:uint):Route
Return the Route object for the ith route in the response.
Parametersi:uint — The index of the route to return. This should be in the range
0 to numRoutes - 1 , inclusive.
|
Route —
The Route object for the ith route in the response.
|
See also
load | () | method |
public function load(query:String):void
Initiates a directions request. Dispatches either
DirectionsEvent.DIRECTIONS_SUCCESS
,
DirectionsEvent.DIRECTIONS_FAILURE
, or
DirectionsEvent.DIRECTIONS_ABORTED
on completion. Each event serves
as a notification that the directions response has come back from the
server, and in the case of the success event, the response information can
be retrieved from this object. When directions results are received, this
object clears old results, replacing them with new ones. Directions results
consist of multiple routes, one per
consecutive pair of waypoints/addresses specified in the query. In turn,
routes consist of multiple steps. If a previous
load()
request has not completed when a new call to
load()
is invoked, the previous request is cancelled and a
DirectionsEvent.DIRECTIONS_ABORTED
event will be dispatched
for that request. Thus,
you can use a single Directions object to issue directions requests
serially, but to generate multiple requests in parallel, you must use
multiple Directions objects.
query:String — A Maps-style directions query. This can be of the form
"from: src to: dst1 to: dst2 ..." or any free-form directions query
("SFO to SJC").
|
— A null or empty query will cause an ArgumentError
to be thrown.
|
See also
setOptions | () | method |
public function setOptions(options:DirectionsOptions):void
Updates the directions options. The options parameter may specify a complete or partial set of directions options.
Parametersoptions:DirectionsOptions — New full or partial set of options for directions.
|