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

Package | org.openscales.core.feature
Class | public class Feature
Inheritance | Feature flash.display.Sprite
Subclasses | LineStringFeature, MultiLineStringFeature, MultiPointFeature, MultiPolygonFeature, PointFeature, PolygonFeature

Features is a geolocalized graphical element. It is generally subclassed to customized how it is displayed. They have an ‘attributes’ property, which is the data object.

Public Properties

| Property | Defined by
--- | --- | ---
|  | attributes : Object | Feature
|  | data : Object | Feature
|  | editionFeatureParent : Feature | Feature
|  | editionFeaturesArray : Array ink to all temporary features used to edit the feature | Feature
|  | geometry : Geometry | Feature
|  | isEditable : Boolean To know if the vector feature is editable when its vector layer is in edit mode | Feature
|  | isEditionFeature : Boolean To know if the vector feature is a temporary vector only used for edition mode | Feature
|  | layer : Layer | Feature
|  | left : Number [read-only] | Feature
|  | lonlat : LonLat [read-only] | Feature
|  | originalStyle : Style | Feature
|  | selected : Boolean | Feature
|  | state : String | Feature
|  | style : Style | Feature
|  | top : Number [read-only] | Feature

Public Methods

| Method | Defined by
--- | --- | ---
|  | Feature(geom:Geometry = null, data:Object = null, style:Style = null, isEditable:Boolean = false, isEditionFeature:Boolean = false) Constructor class | Feature
|  | atPoint(lonlat:LonLat, toleranceLon:Number, toleranceLat:Number):Boolean Determines if the feature is placed at the given point with a certain tolerance (or not). | Feature
|  | clone():Feature To obtain feature clone | Feature
|  | compatibleFeatures(features:Array):Boolean [static] | Feature
|  | createEditionVertices(collection:Collection = null):void create edition vertice(Virtual) only for edition feature | Feature
|  | deleteEditionVertices():void delete edition vertice(Virtual) only for edition feature | Feature
|  | destroy():void Method to destroy a the feature instance. | Feature
|  | draw():void The function allow to customize the display of this feature. | Feature
|  | getEditableClone():Feature o get an editable clone | Feature
|  | onMouseClick(pevt:MouseEvent):void | Feature
|  | onMouseDoubleClick(pevt:MouseEvent):void | Feature
|  | onMouseDown(pevt:MouseEvent):void | Feature
|  | onMouseHover(pevt:MouseEvent):void Events Management | Feature
|  | onMouseMove(pevt:MouseEvent):void | Feature
|  | onMouseOut(pevt:MouseEvent):void | Feature
|  | onMouseUp(pevt:MouseEvent):void | Feature
|  | onScreen():Boolean Determines if the feature is visible on the screen | Feature
|  | refreshEditionVertices():void Refresh edition vertice(Virtual) only for edition feature | Feature
|  | registerListeners():void | Feature
|  | unregisterListeners():void | Feature

Protected Methods

| Method | Defined by
--- | --- | ---
|  | acceptSymbolizer(symbolizer:Symbolizer):Boolean | Feature
|  | executeDrawing(symbolizer:Symbolizer):void | Feature
|  | renderRule(rule:Rule):void | Feature

Property detail

attributes | property

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

data | property |

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

editionFeatureParent | property |

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

editionFeaturesArray | property |

`editionFeaturesArray:Array` [read-write]

ink to all temporary features used to edit the feature

Implementation
`public function get editionFeaturesArray():Array`
`public function set editionFeaturesArray(value:Array):void`

geometry | property |

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

isEditable | property |

`isEditable:Boolean` [read-write]

To know if the vector feature is editable when its vector layer is in edit mode

Implementation
`public function get isEditable():Boolean`
`public function set isEditable(value:Boolean):void`

isEditionFeature | property |

`isEditionFeature:Boolean` [read-write]

To know if the vector feature is a temporary vector only used for edition mode

Implementation
`public function get isEditionFeature():Boolean`
`public function set isEditionFeature(value:Boolean):void`

layer | property |

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

left | property |

`left:Number` [read-only]Implementation
`public function get left():Number`

lonlat | property |

`lonlat:LonLat` [read-only]Implementation
`public function get lonlat():LonLat`

originalStyle | property |

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

selected | property |

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

state | property |

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

style | property |

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

top | property |

`top:Number` [read-only]Implementation
`public function get top():Number`
Constructor detail

Feature | () | constructor

`public function Feature(geom:Geometry = null, data:Object = null, style:Style = null, isEditable:Boolean = false, isEditionFeature:Boolean = false)`

Constructor class

Parameters

| `geom:Geometry` (default = `null`)`` — The layer containing the feature.
| `data:Object` (default = `null`)`` — The lonlat position of the feature.
| `style:Style` (default = `null`)``
| `isEditable:Boolean` (default = `false`)``
| `isEditionFeature:Boolean` (default = `false`)``

Method detail

acceptSymbolizer | () | method

`protected function acceptSymbolizer(symbolizer:Symbolizer):Boolean` Parameters

| `symbolizer:Symbolizer`

Returns

| `Boolean`

atPoint | () | method |

`public function atPoint(lonlat:LonLat, toleranceLon:Number, toleranceLat:Number):Boolean`

Determines if the feature is placed at the given point with a certain tolerance (or not).

Parameters

| `lonlat:LonLat` — The given point
| `toleranceLon:Number` — The longitude tolerance
| `toleranceLat:Number` — The latitude tolerance

Returns

| `Boolean`

clone | () | method |

`public function clone():Feature`

To obtain feature clone

Returns

| `Feature`

compatibleFeatures | () | method |

`public static function compatibleFeatures(features:Array):Boolean` Parameters

| `features:Array`

Returns

| `Boolean`

createEditionVertices | () | method |

`public function createEditionVertices(collection:Collection = null):void`

create edition vertice(Virtual) only for edition feature

Parameters

| `collection:Collection` (default = `null`)``

deleteEditionVertices | () | method |

`public function deleteEditionVertices():void`

delete edition vertice(Virtual) only for edition feature

destroy | () | method |

`public function destroy():void`

Method to destroy a the feature instance.

draw | () | method |

`public function draw():void`

The function allow to customize the display of this feature. Inherited Feature classes usually override this function.

executeDrawing | () | method |

`protected function executeDrawing(symbolizer:Symbolizer):void` Parameters

| `symbolizer:Symbolizer`

getEditableClone | () | method |

`public function getEditableClone():Feature`

o get an editable clone

Returns

| `Feature`

onMouseClick | () | method |

`public function onMouseClick(pevt:MouseEvent):void` Parameters

| `pevt:MouseEvent`

onMouseDoubleClick | () | method |

`public function onMouseDoubleClick(pevt:MouseEvent):void` Parameters

| `pevt:MouseEvent`

onMouseDown | () | method |

`public function onMouseDown(pevt:MouseEvent):void` Parameters

| `pevt:MouseEvent`

onMouseHover | () | method |

`public function onMouseHover(pevt:MouseEvent):void`

Events Management

Parameters

| `pevt:MouseEvent`

onMouseMove | () | method |

`public function onMouseMove(pevt:MouseEvent):void` Parameters

| `pevt:MouseEvent`

onMouseOut | () | method |

`public function onMouseOut(pevt:MouseEvent):void` Parameters

| `pevt:MouseEvent`

onMouseUp | () | method |

`public function onMouseUp(pevt:MouseEvent):void` Parameters

| `pevt:MouseEvent`

onScreen | () | method |

`public function onScreen():Boolean`

Determines if the feature is visible on the screen

Returns

| `Boolean`

refreshEditionVertices | () | method |

`public function refreshEditionVertices():void`

Refresh edition vertice(Virtual) only for edition feature

registerListeners | () | method |

`public function registerListeners():void`

renderRule | () | method |

`protected function renderRule(rule:Rule):void` Parameters

| `rule:Rule`

unregisterListeners | () | method |

`public function unregisterListeners():void`