Packagecom.afcomponents.umap.overlays
Classpublic class RouteLayer
InheritanceRouteLayer Inheritance Layer Inheritance MapObjectContainer Inheritance MapObject Inheritance flash.display.Sprite

Interactive Layer which displays the routing information and provides a simple drag-n-drop interface.

See also

com.afcomponents.umap.display.routemanager.RouteManager


Public Properties
 PropertyDefined by
 InheritedasDisplayObject : DisplayObject
Returns reference to the object as a DisplayObject instance.
MapObject
 InheritedautoCloseInfo : Boolean
Gets or sets the autCloseInfo flag, which indicates whether to close info window automatically when user clicks somewhere on the map.
Layer
 InheritedautoInfo : Boolean
Gets or sets the autInfo flag, which indicates whether to open info window automatically upon mouse click.
Layer
  CONNECT_POLYLINE_STYLE : GeometryStyle
[static]
RouteLayer
 Inheritedcore : UMap
Returns reference to the core UMap object.
MapObject
 Inheriteddescription : String
Gets or sets the description text for the layer.
Layer
 Inheritedid : uint
Gets or sets the ID of the object.
MapObject
 Inheritedinfo : IInfoWindow
Return referens to opened InfoWindow
Layer
 InheritedinfoParam : Object
Gets or sets the info window param object.
Layer
 InheritedinfoStyle : Object
Gets or sets the info window style object associated with the Overlay.
Layer
  MARKER_STYLE : Object
[static]
RouteLayer
  message : String
[read-only]
RouteLayer
  mode : String
RouteLayer
 Inheritedname : String
Gets or sets the name of the object.
Layer
 Inheritedowner : IMapObjectContainer
Returns reference to the owner container object.
MapObject
  PIN_FADING_TIMEOUT : uint = 1000
[static]
RouteLayer
  PIN_ICON : Object
[static]
RouteLayer
  pins : Array
[read-only]
RouteLayer
  polylineDrag : Boolean
RouteLayer
  ROUTE_POLYLINE_STYLE : GeometryStyle
[static]
RouteLayer
  state : String
[read-only]
RouteLayer
 Inheritedvisible : Boolean
Gets or sets the Layer's visibility.
Layer
Protected Properties
 PropertyDefined by
  _connectLine : Polyline
RouteLayer
  _destMarker : Marker
RouteLayer
  _error : String
RouteLayer
  _manager : RouteManager
RouteLayer
  _markers : Layer
RouteLayer
  _message : String
RouteLayer
  _mode : String
RouteLayer
  _pin : Object
RouteLayer
  _pins : Array
RouteLayer
  _pinTimeout : uint
RouteLayer
  _polylineDrag : Boolean
RouteLayer
  _results : RouteResults
RouteLayer
  _route_idx : uint
RouteLayer
  _routes : Array
RouteLayer
  _srcMarker : Marker
RouteLayer
  _state : String
RouteLayer
Public Methods
 MethodDefined by
  
RouteLayer(param:Object = null)
RouteLayer
 Inherited
addObject(object:IMapObject):void
Adds new IMapObject to the container.
MapObjectContainer
 Inherited
Adds new IOverlay to this Layer, invalidates and refreshes it.
Layer
 Inherited
bringForward(object:IMapObject):void
Moves the attached IMapObject forward in the display list.
MapObjectContainer
 Inherited
bringToFront(object:IMapObject):void
Brings the attached IMapObject to the top of the display list.
MapObjectContainer
  
clearAll():void
RouteLayer
 Inherited
clearObjects(filter:Class = null):void
Removes all attached objects.
MapObjectContainer
 Inherited
Removes all attached overlays from the layer.
Layer
  
clearPins():void
RouteLayer
  
clearResults(idx:uint = 0):void
RouteLayer
 Inherited
Creates an exact copy of this Layer with the attached Overlays and returns it to the user.
Layer
  
createMarker(param:Object, index:uint = 0):Marker
RouteLayer
 Inherited
dispose():void
Releases all the resources accuired by the object.
Layer
 Inherited
fromXML(xml:XML):Layer
[static] Creates new Layer from XML object in KML 2.1 format.
Layer
 Inherited
Retruns Overlay bounds in geographical coordinates.
Layer
 Inherited
getBoundsXY(zoom:Number = 0):Bounds
Retruns Overlay bounds in bitmap coordinates.
Layer
  
getDirections(options:Object = null):void
RouteLayer
 Inherited
getObject(id_or_name:*, filter:Class = null):IMapObject
Searches for an object with specified id or name.
MapObjectContainer
 Inherited
getObjectById(id:uint, filter:Class = null):IMapObject
Searches for an object with specified id.
MapObjectContainer
 Inherited
getObjectByName(name:String, matchCase:Boolean = false, filter:Class = null):IMapObject
Searches for an object with specified name.
MapObjectContainer
 Inherited
getObjects(filter:Class = null):Array
Returns an array of IMapObjects that where added to the container.
MapObjectContainer
 Inherited
getOverlay(id_or_name:*):IOverlay
Searches for an IOverlay object with specified id or name.
Layer
 Inherited
getOverlays():Array
Returns an array of IOverlay objects that where added to the Layer.
Layer
 Inherited
hide():void
Hides the Layer.
Layer
 Inherited
invalidate():void
Schedules the Layer for invalidation in 1 frame after this call.
Layer
 Inherited
isOwnerVisible():Boolean
Recursevly checks visibility of parent objects
MapObjectContainer
  
messageFromState(state:String = null):String
RouteLayer
 Inherited
redraw():void
Invalidates Overlays attached to the Layer.
Layer
 Inherited
refresh(full:Boolean = false):void
Refreshes the position of the Overlays attached to the Layer.
Layer
 Inherited
remove():void
Removes the object from the owner container object.
MapObject
  
removeMarker(marker:Marker):void
RouteLayer
 Inherited
removeObject(object:IMapObject):void
Removes IMapObject from the container.
MapObjectContainer
 Inherited
removeOverlay(overlay:IOverlay):void
Removes target IOverlay from the Layer.
Layer
  
search(options:Object = null):void
RouteLayer
 Inherited
sendBackward(object:IMapObject):void
Sends the attached IMapObject backward in the display list.
MapObjectContainer
 Inherited
sendToBack(object:IMapObject):void
Sends the attached IMapObject to the bottom of the display list.
MapObjectContainer
  
setMarker(marker:Marker, index:uint = 0):void
RouteLayer
 Inherited
Adds the object to the specified IMapObjectContainer.
Layer
  
setState(state:String):void
RouteLayer
 Inherited
show():void
Shows the Layer.
Layer
  
startWizard():void
RouteLayer
  
stopWizard():void
RouteLayer
 Inherited
toString():String
Returns a textual representation of the object.
MapObject
 Inherited
toXML(full:Boolean = true, afcTags:Boolean = false):XML
Builds an XML object in KML 2.1 format that describes the Overlay & it's style.
Layer
 Inherited
updateMapType(mapType:IMapType):void
Invoked when map type has been changed.
Layer
 Inherited
updatePosition(latlng:LatLng):void
Invoked when the map position has been updated.
Layer
 Inherited
updateZoom(zoom:Number):void
Invoked when map the zoom has been updated.
Layer
Protected Methods
 MethodDefined by
  
connectPins():void
RouteLayer
  
createPin():Object
RouteLayer
  
enterPinState(pin:Object, state:String):void
RouteLayer
  
enterState(state:String):void
RouteLayer
  
getPinPosition(pin:Object):LatLng
RouteLayer
  
getPinState(pin:Object):String
RouteLayer
  
hitTestPins(tx:int, ty:int):Boolean
RouteLayer
  
hitTestRoute(tx:int, ty:int):Boolean
RouteLayer
  
leavePinState(pin:Object, state:String):void
RouteLayer
  
leaveState(state:String):void
RouteLayer
  
mapClick(event:MapEvent):void
RouteLayer
  
RouteLayer
  
RouteLayer
  
setErrorState(message:String = ""):void
RouteLayer
  
setPinState(pin:Object, state:String):void
RouteLayer
Public Constants
 ConstantDefined by
  MODE_MANUAL : String = "manual"
[static]
RouteLayer
  MODE_WIZARD : String = "wizard"
[static]
RouteLayer
  STATE_BROWSE : String = "browse"
[static]
RouteLayer
  STATE_DRAGGING : String = "dragging"
[static]
RouteLayer
  STATE_ERROR : String = "error"
[static]
RouteLayer
  STATE_IDLE : String = "idle"
[static]
RouteLayer
  STATE_MANUAL : String = "manual"
[static]
RouteLayer
  STATE_POINTS : String = "points"
[static]
RouteLayer
  STATE_SEARCH : String = "search"
[static]
RouteLayer
Protected Constants
 ConstantDefined by
  PIN_STATE_DRAGGING : String = "pinDragging"
[static]
RouteLayer
  PIN_STATE_FADING : String = "pinFading"
[static]
RouteLayer
  PIN_STATE_FIXED : String = "pinFixed"
[static]
RouteLayer
  PIN_STATE_INVISIBLE : String = "pinInivisible"
[static]
RouteLayer
  PIN_STATE_NULL : String = "pinNull"
[static]
RouteLayer
  PIN_STATE_VISIBLE : String = "pinVisible"
[static]
RouteLayer
Property detail
_connectLineproperty
protected var _connectLine:Polyline
CONNECT_POLYLINE_STYLEproperty 
public static var CONNECT_POLYLINE_STYLE:GeometryStyle
_destMarkerproperty 
protected var _destMarker:Marker
_errorproperty 
protected var _error:String
_managerproperty 
protected var _manager:RouteManager
_markersproperty 
protected var _markers:Layer
MARKER_STYLEproperty 
public static var MARKER_STYLE:Object
_messageproperty 
protected var _message:String
messageproperty 
message:String  [read-only]Implementation
    public function get message():String
_modeproperty 
protected var _mode:String
modeproperty 
mode:String  [read-write]Implementation
    public function get mode():String
    public function set mode(value:String):void
_pinproperty 
protected var _pin:Object
PIN_FADING_TIMEOUTproperty 
public static var PIN_FADING_TIMEOUT:uint = 1000
PIN_ICONproperty 
public static var PIN_ICON:Object
_pinsproperty 
protected var _pins:Array
pinsproperty 
pins:Array  [read-only]Implementation
    public function get pins():Array
_pinTimeoutproperty 
protected var _pinTimeout:uint
_polylineDragproperty 
protected var _polylineDrag:Boolean
polylineDragproperty 
polylineDrag:Boolean  [read-write]Implementation
    public function get polylineDrag():Boolean
    public function set polylineDrag(value:Boolean):void
_resultsproperty 
protected var _results:RouteResults
_route_idxproperty 
protected var _route_idx:uint
ROUTE_POLYLINE_STYLEproperty 
public static var ROUTE_POLYLINE_STYLE:GeometryStyle
_routesproperty 
protected var _routes:Array
_srcMarkerproperty 
protected var _srcMarker:Marker
_stateproperty 
protected var _state:String
stateproperty 
state:String  [read-only]Implementation
    public function get state():String
Constructor detail
RouteLayer()constructor
public function RouteLayer(param:Object = null)Parameters
param:Object (default = null)
Method detail
clearAll()method
public function clearAll():void
clearPins()method 
public function clearPins():void
clearResults()method 
public function clearResults(idx:uint = 0):voidParameters
idx:uint (default = 0)
connectPins()method 
protected function connectPins():void
createMarker()method 
public function createMarker(param:Object, index:uint = 0):MarkerParameters
param:Object
 
index:uint (default = 0)

Returns
Marker
createPin()method 
protected function createPin():Object

Returns
Object
enterPinState()method 
protected function enterPinState(pin:Object, state:String):voidParameters
pin:Object
 
state:String
enterState()method 
protected function enterState(state:String):voidParameters
state:String
getDirections()method 
public function getDirections(options:Object = null):voidParameters
options:Object (default = null)
getPinPosition()method 
protected function getPinPosition(pin:Object):LatLngParameters
pin:Object

Returns
LatLng
getPinState()method 
protected function getPinState(pin:Object):StringParameters
pin:Object

Returns
String
hitTestPins()method 
protected function hitTestPins(tx:int, ty:int):BooleanParameters
tx:int
 
ty:int

Returns
Boolean
hitTestRoute()method 
protected function hitTestRoute(tx:int, ty:int):BooleanParameters
tx:int
 
ty:int

Returns
Boolean
leavePinState()method 
protected function leavePinState(pin:Object, state:String):voidParameters
pin:Object
 
state:String
leaveState()method 
protected function leaveState(state:String):voidParameters
state:String
mapClick()method 
protected function mapClick(event:MapEvent):voidParameters
event:MapEvent
messageFromState()method 
public function messageFromState(state:String = null):StringParameters
state:String (default = null)

Returns
String
pinFadingTimeout()method 
protected function pinFadingTimeout():void
refreshPinIndex()method 
protected function refreshPinIndex():void
removeMarker()method 
public function removeMarker(marker:Marker):voidParameters
marker:Marker
search()method 
public function search(options:Object = null):voidParameters
options:Object (default = null)
setErrorState()method 
protected function setErrorState(message:String = ""):voidParameters
message:String (default = "")
setMarker()method 
public function setMarker(marker:Marker, index:uint = 0):voidParameters
marker:Marker
 
index:uint (default = 0)
setPinState()method 
protected function setPinState(pin:Object, state:String):voidParameters
pin:Object
 
state:String
setState()method 
public function setState(state:String):voidParameters
state:String
startWizard()method 
public function startWizard():void
stopWizard()method 
public function stopWizard():void
Constant detail
MODE_MANUALconstant
public static const MODE_MANUAL:String = "manual"
MODE_WIZARDconstant 
public static const MODE_WIZARD:String = "wizard"
PIN_STATE_DRAGGINGconstant 
protected static const PIN_STATE_DRAGGING:String = "pinDragging"
PIN_STATE_FADINGconstant 
protected static const PIN_STATE_FADING:String = "pinFading"
PIN_STATE_FIXEDconstant 
protected static const PIN_STATE_FIXED:String = "pinFixed"
PIN_STATE_INVISIBLEconstant 
protected static const PIN_STATE_INVISIBLE:String = "pinInivisible"
PIN_STATE_NULLconstant 
protected static const PIN_STATE_NULL:String = "pinNull"
PIN_STATE_VISIBLEconstant 
protected static const PIN_STATE_VISIBLE:String = "pinVisible"
STATE_BROWSEconstant 
public static const STATE_BROWSE:String = "browse"
STATE_DRAGGINGconstant 
public static const STATE_DRAGGING:String = "dragging"
STATE_ERRORconstant 
public static const STATE_ERROR:String = "error"
STATE_IDLEconstant 
public static const STATE_IDLE:String = "idle"
STATE_MANUALconstant 
public static const STATE_MANUAL:String = "manual"
STATE_POINTSconstant 
public static const STATE_POINTS:String = "points"
STATE_SEARCHconstant 
public static const STATE_SEARCH:String = "search"