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

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

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
|  | dragHandler : DragHandler | DrawHandler
|  | drawLayer : FeatureLayer | DrawHandler
|  | drawType : String = "" Type of drawing (point, path or polygon) | DrawHandler
|  | editionHandler : FeatureLayerEditionHandler Edition Handler | DrawHandler
|  | isDragging : Boolean = false Dragging state | DrawHandler
|  | map : Map [write-only] | DrawHandler
|  | mode : int [write-only] | DrawHandler
|  | multiFeaturesHandler : DrawMultiHandler Handler of MultiFeature | DrawHandler
|  | pathHandler : DrawPathHandler Handler of PathFeature | DrawHandler
|  | pointHandler : DrawPointHandler Handler of PointFeature | DrawHandler
|  | polygonHandler : DrawPolygonHandler Handler of PolygonFeature | DrawHandler
|  | selectFeaturesHandler : SelectFeaturesHandler Mouse handlers | DrawHandler
|  | toggleHandlerActivity : Function Getter and setter of the callback function used when the handler's activity changes | Handler

Public Methods

| Method | Defined by
--- | --- | ---
|  | DrawHandler(map:Map = null, active:Boolean = false, drawLayer:FeatureLayer = null) | DrawHandler
|  | deleteSelectedFeatures():void User clicks on delete selected feature button | DrawHandler
|  | finishPath():void Finish a path Force to finalyse a path (event it's not finished) | DrawHandler
|  | finishPolygon():void Finish a polygon Force to finalyse a polygon (even it's not finished) | DrawHandler
|  | onDeleteLastClick(event:Event):void User clicks on delete last feature button | DrawHandler

Protected Methods
Hide Inherited Protected Methods
Show Inherited Protected Methods

| Method | Defined by
--- | --- | ---
|  | registerListeners():void Add the listeners to the associated map | Handler
|  | unregisterListeners():void Remove the listeners to the associated map | Handler

Public Constants

| Constant | Defined by
--- | --- | ---
|  | DRAG_MODE : int = 0 [static] Selection mode | DrawHandler
|  | DRAW_PATH_MODE : int = 3 [static] | DrawHandler
|  | DRAW_POINT_MODE : int = 2 [static] | DrawHandler
|  | DRAW_POLYGON_MODE : int = 4 [static] | DrawHandler
|  | EDIT_MODE : int = 5 [static] | DrawHandler
|  | SELECT_MODE : int = 1 [static] | DrawHandler

Property detail

dragHandler | property

`public var dragHandler:DragHandler`

drawLayer | property |

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

drawType | property |

`public var drawType:String = ""`

Type of drawing (point, path or polygon)

editionHandler | property |

`public var editionHandler:FeatureLayerEditionHandler`

Edition Handler

isDragging | property |

`public var isDragging:Boolean = false`

Dragging state

map | property |

`map:Map` [write-only]Implementation
`public function set map(value:Map):void`

mode | property |

`mode:int` [write-only]Implementation
`public function set mode(value:int):void`

multiFeaturesHandler | property |

`public var multiFeaturesHandler:DrawMultiHandler`

Handler of MultiFeature

pathHandler | property |

`public var pathHandler:DrawPathHandler`

Handler of PathFeature

pointHandler | property |

`public var pointHandler:DrawPointHandler`

Handler of PointFeature

polygonHandler | property |

`public var polygonHandler:DrawPolygonHandler`

Handler of PolygonFeature

selectFeaturesHandler | property |

`public var selectFeaturesHandler:SelectFeaturesHandler`

Mouse handlers

Constructor detail

DrawHandler | () | constructor

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

| `map:Map` (default = `null`)``
| `active:Boolean` (default = `false`)``
| `drawLayer:FeatureLayer` (default = `null`)``

Method detail

deleteSelectedFeatures | () | method

`public function deleteSelectedFeatures():void`

User clicks on delete selected feature button

finishPath | () | method |

`public function finishPath():void`

Finish a path Force to finalyse a path (event it's not finished)

finishPolygon | () | method |

`public function finishPolygon():void`

Finish a polygon Force to finalyse a polygon (even it's not finished)

onDeleteLastClick | () | method |

`public function onDeleteLastClick(event:Event):void`

User clicks on delete last feature button

Parameters

| `event:Event`

Constant detail

DRAG_MODE | constant

`public static const DRAG_MODE:int = 0`

Selection mode

DRAW_PATH_MODE | constant |

`public static const DRAW_PATH_MODE:int = 3`

DRAW_POINT_MODE | constant |

`public static const DRAW_POINT_MODE:int = 2`

DRAW_POLYGON_MODE | constant |

`public static const DRAW_POLYGON_MODE:int = 4`

EDIT_MODE | constant |

`public static const EDIT_MODE:int = 5`

SELECT_MODE | constant |

`public static const SELECT_MODE:int = 1`