Packageorg.openscales.core.handler.feature.draw
Classpublic class DrawPathHandler
InheritanceDrawPathHandler Inheritance AbstractDrawHandler Inheritance Handler Inheritance Object
Subclasses Distance, DrawSegmentHandler

This handler manage the function draw of the LineString (path). Active this handler to draw a path.



Public Properties
 PropertyDefined By
 Inheritedactive : Boolean
Getter and setter of the boolean defining the activity of the handler
Handler
  currentLineStringFeature : LineStringFeature
DrawPathHandler
  drawContainer : Sprite
[read-only]
DrawPathHandler
 InheriteddrawLayer : VectorLayer
The layer concerned by the drawing Operation
AbstractDrawHandler
  id : Number
DrawPathHandler
  lastPoint : Point
DrawPathHandler
  lineString : LineString
DrawPathHandler
  map : Map
[override]
DrawPathHandler
  newFeature : Boolean
DrawPathHandler
  startPoint : Pixel
DrawPathHandler
  style : Style
The style of the path
DrawPathHandler
 InheritedtoggleHandlerActivity : Function
Getter and setter of the callback function used when the handler's activity changes
Handler
Protected Properties
 PropertyDefined By
  _currentLineStringFeature : LineStringFeature = null
The LineStringfeature currently drawn
DrawPathHandler
Public Methods
 MethodDefined By
  
DrawPathHandler(map:Map = null, active:Boolean = false, drawLayer:VectorLayer = null)
DrawPathHandler constructor
DrawPathHandler
  
Finish the LineString
DrawPathHandler
  
mouseDblClick(Lastpx:Pixel = null):void
This function occured when a double click occured during the drawing operation
DrawPathHandler
  
temporaryLine(evt:MouseEvent):void
Update the temporary line
DrawPathHandler
Protected Methods
 MethodDefined By
  
drawLine(event:MouseEvent = null):void
DrawPathHandler
  
[override]
DrawPathHandler
  
[override]
DrawPathHandler
  
DrawPathHandler
Property Detail
_currentLineStringFeatureproperty
protected var _currentLineStringFeature:LineStringFeature = null

The LineStringfeature currently drawn

currentLineStringFeatureproperty 
currentLineStringFeature:LineStringFeature


Implementation
    public function get currentLineStringFeature():LineStringFeature
    public function set currentLineStringFeature(value:LineStringFeature):void
drawContainerproperty 
drawContainer:Sprite  [read-only]


Implementation
    public function get drawContainer():Sprite
idproperty 
id:Number


Implementation
    public function get id():Number
    public function set id(value:Number):void
lastPointproperty 
lastPoint:Point


Implementation
    public function get lastPoint():Point
    public function set lastPoint(value:Point):void
lineStringproperty 
lineString:LineString


Implementation
    public function get lineString():LineString
    public function set lineString(value:LineString):void
mapproperty 
map:Map[override]


Implementation
    public function get map():Map
    public function set map(value:Map):void
newFeatureproperty 
newFeature:Boolean


Implementation
    public function get newFeature():Boolean
    public function set newFeature(value:Boolean):void
startPointproperty 
startPoint:Pixel


Implementation
    public function get startPoint():Pixel
    public function set startPoint(value:Pixel):void
styleproperty 
style:Style

The style of the path


Implementation
    public function get style():Style
    public function set style(value:Style):void
Constructor Detail
DrawPathHandler()Constructor
public function DrawPathHandler(map:Map = null, active:Boolean = false, drawLayer:VectorLayer = null)

DrawPathHandler constructor

Parameters
map:Map (default = null)
 
active:Boolean (default = false)
 
drawLayer:VectorLayer (default = null) — The layer on which we'll draw
Method Detail
drawFinalPath()method
public function drawFinalPath():void

Finish the LineString

drawLine()method 
protected function drawLine(event:MouseEvent = null):void

Parameters

event:MouseEvent (default = null)

mouseDblClick()method 
public function mouseDblClick(Lastpx:Pixel = null):void

This function occured when a double click occured during the drawing operation

Parameters

Lastpx:Pixel (default = null) — The position of the double click pixel

registerListeners()method 
override protected function registerListeners():void

temporaryLine()method 
public function temporaryLine(evt:MouseEvent):void

Update the temporary line

Parameters

evt:MouseEvent

unregisterListeners()method 
override protected function unregisterListeners():void

updateZoom()method 
protected function updateZoom(evt:MapEvent):void

Parameters

evt:MapEvent