API Documentation | All Packages | All Classes | Index | Frames No Frames |
Class DrawPathHandler

Package | org.openscales.core.handler.feature.draw
Class | public class DrawPathHandler
Inheritance | DrawPathHandler AbstractDrawHandler Handler

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

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined by
--- | --- | ---
|  | active : Boolean Getter and setter of the boolean defining the activity of the handler | Handler
|  | drawContainer : Sprite [read-only] | DrawPathHandler
|  | drawLayer : FeatureLayer The layer concerned by the drawing Operation | AbstractDrawHandler
|  | id : Number | DrawPathHandler
|  | lastPoint : Point | DrawPathHandler
|  | map : Map [write-only] | DrawPathHandler
|  | newFeature : Boolean | DrawPathHandler
|  | startPoint : Pixel | DrawPathHandler
|  | toggleHandlerActivity : Function Getter and setter of the callback function used when the handler's activity changes | Handler

Public Methods

| Method | Defined by
--- | --- | ---
|  | DrawPathHandler(map:Map = null, active:Boolean = false, drawLayer:FeatureLayer = null) DrawPathHandler constructor | DrawPathHandler
|  | drawFinalPath():void Finish the LineString | DrawPathHandler
|  | mouseDblClick(Lastpx:Pixel):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

| Method | Defined by
--- | --- | ---
|  | drawLine(event:MouseEvent = null):void | DrawPathHandler
|  | registerListeners():void | DrawPathHandler
|  | unregisterListeners():void | DrawPathHandler

Property detail

drawContainer | property

`drawContainer:Sprite` [read-only]Implementation
`public function get drawContainer():Sprite`

id | property |

`id:Number` [read-write]Implementation
`public function get id():Number`
`public function set id(value:Number):void`

lastPoint | property |

`lastPoint:Point` [read-write]Implementation
`public function get lastPoint():Point`
`public function set lastPoint(value:Point):void`

map | property |

`map:Map` [write-only]

Implementation
`public function set map(value:Map):void`

newFeature | property |

`newFeature:Boolean` [read-write]Implementation
`public function get newFeature():Boolean`
`public function set newFeature(value:Boolean):void`

startPoint | property |

`startPoint:Pixel` [read-write]Implementation
`public function get startPoint():Pixel`
`public function set startPoint(value:Pixel):void`
Constructor detail

DrawPathHandler | () | constructor

`public function DrawPathHandler(map:Map = null, active:Boolean = false, drawLayer:FeatureLayer = null)`

DrawPathHandler constructor

Parameters

| `map:Map` (default = `null`)``
| `active:Boolean` (default = `false`)``
| `drawLayer:FeatureLayer` (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):void`

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

Parameters

| `Lastpx:Pixel` — The position of the double click pixel

registerListeners | () | method |

`protected override function registerListeners():void`

temporaryLine | () | method |

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

Update the temporary line

Parameters

| `evt:MouseEvent`

unregisterListeners | () | method |

`protected override function unregisterListeners():void`