| Package | com.afcomponents.umap.display.routemanager |
| Class | public class RouteManager |
| Inheritance | RouteManager Manager MapObjectContainer MapObject flash.display.Sprite |
| Implements | IManager |
| Property | Defined by | ||
|---|---|---|---|
![]() | asDisplayObject : DisplayObject
Returns reference to the object as a DisplayObject instance.
| MapObject | |
![]() | core : UMap
Returns reference to the core UMap object.
| MapObject | |
![]() | id : uint
Gets or sets the ID of the object.
| MapObject | |
| name : String [write-only]
| RouteManager | ||
![]() | owner : IMapObjectContainer
Returns reference to the owner container object.
| MapObject | |
| routeResults : RouteResults
[read-only]
Returns last routing results.
| RouteManager | ||
| Method | Defined by | ||
|---|---|---|---|
|
RouteManager(service:* = null, options:Object = null)
Initialized the route manager.
| RouteManager | ||
![]() |
addObject(object:IMapObject):void
Adds new IMapObject to the container.
| MapObjectContainer | |
![]() |
bringForward(object:IMapObject):void
Moves the attached IMapObject forward in the display list.
| MapObjectContainer | |
![]() |
bringToFront(object:IMapObject):void
Brings the attached IMapObject to the top of the display list.
| MapObjectContainer | |
![]() |
clearObjects(filter:Class = null):void
Removes all attached objects.
| MapObjectContainer | |
![]() |
dispose():void
Releases all the resources accuired by the object.
| MapObjectContainer | |
|
doRoute(locations:Array, options:Object = null):Boolean
Performs the route query for the specified locations.
| RouteManager | ||
|
getAllManeuvers(results:RouteResults = null):Array
| RouteManager | ||
![]() |
getObject(id_or_name:*, filter:Class = null):IMapObject
Searches for an object with specified id or name.
| MapObjectContainer | |
![]() |
getObjectById(id:uint, filter:Class = null):IMapObject
Searches for an object with specified id.
| MapObjectContainer | |
![]() |
getObjectByName(name:String, matchCase:Boolean = false, filter:Class = null):IMapObject
Searches for an object with specified name.
| MapObjectContainer | |
![]() |
getObjects(filter:Class = null):Array
Returns an array of IMapObjects that where added to the container.
| MapObjectContainer | |
|
getService():*
| RouteManager | ||
![]() |
init():void
| Manager | |
![]() |
isOwnerVisible():Boolean
Recursevly checks visibility of parent objects
| MapObjectContainer | |
![]() |
ready():void
| Manager | |
![]() |
remove():void
Removes the object from the owner container object.
| MapObject | |
![]() |
removeObject(object:IMapObject):void
Removes IMapObject from the container.
| MapObjectContainer | |
|
[static]
Returns a Polyline which connects all route points of the specified
RouteResults object. | RouteManager | ||
![]() |
sendBackward(object:IMapObject):void
Sends the attached IMapObject backward in the display list.
| MapObjectContainer | |
![]() |
sendToBack(object:IMapObject):void
Sends the attached IMapObject to the bottom of the display list.
| MapObjectContainer | |
![]() |
setOwner(owner:IMapObjectContainer):void
Adds the object to the specified IMapObjectContainer.
| MapObjectContainer | |
|
setService(service:*, options:Object = null):void
Sets new service type.
| RouteManager | ||
|
Adds results polyline to the map and shows it.
| RouteManager | ||
![]() |
toString():String
Returns a textual representation of the object.
| MapObject | |
![]() |
updateComponentProperty(property:String, value:*):void
| Manager | |
![]() |
updateMapType(mapType:IMapType):void
| Manager | |
![]() |
updatePosition(latlng:LatLng):void
| Manager | |
![]() |
updateSize(width:Number, height:Number):void
| Manager | |
![]() |
updateZoom(zoom:Number):void
| Manager | |
| Constant | Defined by | ||
|---|---|---|---|
| BING_SERVICE : Class [static]
| RouteManager | ||
| CLOUD_MADE_SERVICE : Class [static]
| RouteManager | ||
| DEFAULT_SERVICE : Class [static]
| RouteManager | ||
| MAP_QUEST_SERVICE : Class [static]
| RouteManager | ||
| name | property |
name:String [write-only]Implementation
public function set name(value:String):void
| routeResults | property |
routeResults:RouteResults [read-only]Returns last routing results.
Implementation public function get routeResults():RouteResults
| RouteManager | () | constructor |
public function RouteManager(service:* = null, options:Object = null)Initialized the route manager. You can specify the route service type and the default service options via constructor parameters.
Parametersservice:* (default = null) — Class or IRouteService object instance.
|
|
options:Object (default = null) — Default service parameters.
|
import com.afcomponents.umap.display.routemanager.RouteManager;
// create RouteManager
var rm:RouteManager = new RouteManager(RouteManager.MAP_QUEST_SERVICE, {clientId:12345, password:secret"});
map.addManager(rm);
// find & display route from Denver to New York
var start:GeoAddress = new GeoAddress();
start.country = "US";
start.state = "CO";
start.city = "Denver";
start.latlng = new LatLng(39.740112, -104.984856);
var end:GeoAddress = new GeoAddress();
end.country = "US";
end.state = "NY";
end.city = "New York";
end.latlng = new LatLng(40.720409, -73.994637);
rm.doRoute([start, end]);
| doRoute | () | method |
public function doRoute(locations:Array, options:Object = null):BooleanPerforms the route query for the specified locations. The points should be specifed in the service required format. Additional query properties can be specified in the options parameter.
Parameterslocations:Array — 2 or more route points.
|
|
options:Object (default = null) — Additional query parameters.
|
Boolean — A value of true if query paramters has been accepted by the
service and the execution began; false if it was not.
|
| getAllManeuvers | () | method |
public function getAllManeuvers(results:RouteResults = null):ArrayParameters
results:RouteResults (default = null) |
Array |
| getService | () | method |
public function getService():*
Returns
* |
| resultsToPolyline | () | method |
public static function resultsToPolyline(results:RouteResults, param:Object = null, style:Object = null):Polyline
Returns a Polyline which connects all route points of the specified RouteResults object.
results:RouteResults — Target routing results.
|
|
param:Object (default = null) — Default parameters object for the created Polyline.
|
|
style:Object (default = null) — Default polyline style object.
|
Polyline —
A Polyline object which connects all route points.
|
| setService | () | method |
public function setService(service:*, options:Object = null):void
Sets new service type. Service parameter can be either a Class or IRouteService instance.
If you set service as a Class, additionally you can specify default service options.
service:* — Either a Class or IRouteService instance.
|
|
options:Object (default = null) — service options.
|
| showResults | () | method |
public function showResults(results:RouteResults = null, layer:Layer = null):PolylineAdds results polyline to the map and shows it. If the results parameter is omitted, shows previous results.
Parametersresults:RouteResults (default = null) — Valid RouteResults object or null, if previous results should be shown
|
|
layer:Layer (default = null) — A Layer object to which resulting polyline should be attached. By default attached to the route layer.
|
Polyline —
A Polyline object
|
| BING_SERVICE | constant |
public static const BING_SERVICE:Class
| CLOUD_MADE_SERVICE | constant |
public static const CLOUD_MADE_SERVICE:Class
| DEFAULT_SERVICE | constant |
public static const DEFAULT_SERVICE:Class
| MAP_QUEST_SERVICE | constant |
public static const MAP_QUEST_SERVICE:Class