Packagecom.esri.aws.awx.map.handlers
Classpublic class RedLineMouseHandler
InheritanceRedLineMouseHandler Inheritance BaseOverlayMouseHandler Inheritance BaseMouseHandler Inheritance flash.events.EventDispatcher

RedLineMouseHandler is used to create a redline overlay while the mouse is down. The overlay can be added to the map as an overlay. A OVERLAY_CREATED event is dispatched on mouse up.

See also

com.esri.aws.awx.events.OverlayEvent


Public Properties
 PropertyDefined by
 InheritedapplyToMap : Boolean
BaseOverlayMouseHandler
 Inheritedmap : IMap
The map reference.
BaseMouseHandler
 InheritedoverlayLayer : OverlayLayer
The overlayLayer to which the overlay will be added
BaseOverlayMouseHandler
 InheritedoverlayObjectClass : *
Define the overlay object class to create instances of overlay objects for that layer.
BaseOverlayMouseHandler
 Inheritedstyle : IStyle
BaseOverlayMouseHandler
Protected Properties
 PropertyDefined by
 Inheritedm_applyToMap : Boolean
If true, the overlay will be added to the overlay layer.
BaseOverlayMouseHandler
 Inheritedm_map : IMap
The IMap reference.
BaseMouseHandler
 Inheritedm_overlayLayer : OverlayLayer
The overlay layer to add the overlays to.
BaseOverlayMouseHandler
 Inheritedm_overlayObject : OverlayObject
The created overlaye object.
BaseOverlayMouseHandler
 Inheritedm_overlayObjectClass : Class
The overlay object class to create instances of overlay objects for the layer.
BaseOverlayMouseHandler
 Inheritedm_style : IStyle
The overlay style.
BaseOverlayMouseHandler
Public Methods
 MethodDefined by
  
RedLineMouseHandler(overlayLayer:OverlayLayer, style:IStyle = null, applyToMap:Boolean = true)
Creates a new RedLineMouseHandler.
RedLineMouseHandler
  
cleanUp():void
Cleans up any extraneous handlers when mouse handler is removed.
RedLineMouseHandler
 Inherited
onClick(event:MouseEvent):void
Mouse click function handler.
BaseMouseHandler
 Inherited
onDoubleClick(event:MouseEvent):void
Mouse double-click function handler.
BaseMouseHandler
  
onMouseDown(event:MouseEvent):void
On mouse down, creates the redline overlay.
RedLineMouseHandler
  
onMouseMove(event:MouseEvent):void
On mouse move and while the mouse is down, adds the current mouse location to the redline overlay.
RedLineMouseHandler
 Inherited
onMouseOut(event:MouseEvent):void
Mouse out function handler.
BaseMouseHandler
 Inherited
onMouseOver(event:MouseEvent):void
Mouse over function handler.
BaseMouseHandler
  
onMouseUp(event:MouseEvent):void
On mouse up, checks if the redline should be added to the map as an overlay, and dispatches aa OVERLAY_CREATED event.
RedLineMouseHandler
 Inherited
onMouseWheel(event:MouseEvent):void
Mouse wheel function handler.
BaseMouseHandler
Protected Methods
 MethodDefined by
 Inherited
stage2GeoPoint(event:MouseEvent):GeoPoint
Converts a stage location to a geograhic location.
BaseMouseHandler
Events
 EventSummaryDefined by
   The overlayCreated event is dispatched when the user has finished drawing and the redline is added to the overlay layer on the map.RedLineMouseHandler
Constructor detail
RedLineMouseHandler()constructor
public function RedLineMouseHandler(overlayLayer:OverlayLayer, style:IStyle = null, applyToMap:Boolean = true)

Creates a new RedLineMouseHandler.

Parameters
overlayLayer:OverlayLayer — The layer to apply the style to.
 
style:IStyle (default = null) — The style of the overlay. Default is null.
 
applyToMap:Boolean (default = true) — If true, the overlay will be added to the overlay layer on mouse up.
Method detail
cleanUp()method
public override function cleanUp():void

Cleans up any extraneous handlers when mouse handler is removed.

onMouseDown()method 
public override function onMouseDown(event:MouseEvent):void

On mouse down, creates the redline overlay.

Parameters
event:MouseEvent
onMouseMove()method 
public override function onMouseMove(event:MouseEvent):void

On mouse move and while the mouse is down, adds the current mouse location to the redline overlay.

Parameters
event:MouseEvent
onMouseUp()method 
public override function onMouseUp(event:MouseEvent):void

On mouse up, checks if the redline should be added to the map as an overlay, and dispatches aa OVERLAY_CREATED event.

Parameters
event:MouseEvent
Event detail
overlayCreatedevent 
Event object type: com.esri.aws.awx.events.OverlayEvent
OverlayEvent.type property = com.esri.aws.awx.events.OverlayEvent.OVERLAY_CREATED

The overlayCreated event is dispatched when the user has finished drawing and the redline is added to the overlay layer on the map.