Contains methods for calculating directions and displaying a route on a map.
Initializes a new instance of the DirectionsManager class.
Adds a waypoint to the route at the given index, if specified. If an index is not specified the waypoint is added as the last waypoint in the route.
To recalculate the route, use calculateDirections.
The maximum number of walking or driving waypoints is 25. The maximum number of transit waypoints is 2.
Up to 10 via points are allowed between two stop waypoints.
Calculates directions based on request and render options set (setRequestOptions, setRenderOptions) and the waypoints added (addWaypoint). The directionsUpdated event fires when the calculation is complete and the route is displayed on the map.
You must call this method after making any changes to the route options or waypoints.
Clears the directions displayed and removes the route line from the map. This method does not remove waypoints from the route and retains all calculated direction information and option settings. To clear the calculated directions and options, use resetDirections.
Deletes the DirectionsManager object and releases any associated resources.
Returns the waypoints for the route.
Returns the map object associated with the directions manager.
getNearbyMajorRoads(location:Location, callback:function, errorCallback:function, userData:object)
Searches around the specified location for nearby major roads and returns them as an object to the callback function.
Returns the route render options.
Returns the directions request options.
Returns the current calculated route(s). If the route was not successfully calculated, null is returned.
removeWaypoint(waypoint:Waypoint) or removeWaypoint(index:number)
Removes the given waypoint or the waypoint identified by the given index from the route. Use calculateDirections to update the route once a waypoint has been removed.
If no options object is supplied, clears the directions request and render options and removes all waypoints.
reverseGeocode(location:Location, callback:function, errorCallback:function, userData:object)
Matches the specified location to an address and returns the address to the specified callback function.
Sets the map view based on the current route index.
Sets the specified render options for the route.
Sets the specified route calculation options.
Occurs after the route selector has fully rendered.
Occurs after each step in the itinerary has fully rendered.
Occurs after the route summary has fully rendered.
Occurs after each route waypoint has fully rendered.
Occurs before the waypoint disambiguation element is rendered. Use the autoDisplayDisambiguation directions render option to automatically display waypoint disambiguation.
Occurs just before the route selector renders.
Occurs just before each step in the itinerary renders.
Occurs just before the route summary renders.
Occurs just before each route waypoint renders.
Occurs when calculating the directions caused an error.
Occurs when the directions calculation was successful and the itinerary and route on the map have been updated.
Occurs when the drag of a waypoint or route is completed.
Occurs when a step in the itinerary is clicked.
Occurs when the mouse cursor is over the route selector.
Occurs when the mouse cursor is over a directions step.
Occurs when the mouse cursor leaves the route selector.
Occurs when the mouse cursor leaves a directions step.
Occurs when the route selector is clicked.
Occurs when a new waypoint is added to the route.
Occurs when a waypoint is removed from the route.