Packageorg.openscales.core.layer
Classpublic class VectorLayer
InheritanceVectorLayer Inheritance Layer Inheritance flash.display.Sprite
Subclasses GeoRss, GML, GPX, Graticule, KML, WFS

Layer that display features stored as child element



Public Properties
 PropertyDefined By
 Inheritedaggregate : Aggregate
The aggregate which contains this layer, null most of the time.
Layer
 Inheritedalpha : Number
[override] [write-only] opacity of the layer (between 0 and 1)
Layer
  attributesId : Vector.<String>
VectorLayer
  available : Boolean
[override] [read-only]
VectorLayer
 InheritedavailableProjections : Vector.<String>
Define the layer available projections by its SRS codes.
Layer
 Inheritedconstraints : Vector.<Constraint>
A list of constraints for the layer
Layer
  data : XML
If the VectorLayer is made from locale source : the XML data
VectorLayer
 InheritedDEFAULT_MAXEXTENT : Bounds
[static] [read-only]
Layer
 Inheriteddisplayed : Boolean
[read-only] Is this layer currently displayed ?
Layer
 InheriteddisplayInLayerManager : Boolean
Indicates if the layer should be displayed in the LayerManager List or not
Layer
 Inheriteddpi : Number
Indicates the dpi used to calculate resolution and scale upon this layer
Layer
  editable : Boolean
VectorLayer
 Inheritedextent : Bounds
[read-only] A Bounds object which represents the location bounds of the current extent display on the map.
Layer
  features : Vector.<Feature>
[read-only] The list of features contained by this layer
VectorLayer
  featuresBbox : Bounds
VectorLayer
  featuresID : Vector.<String>
[read-only]
VectorLayer
  geometryType : String
VectorLayer
  idLabel : uint
VectorLayer
  idPath : uint
VectorLayer
  idPoint : uint
VectorLayer
  idPolygon : uint
VectorLayer
  inEditionMode : Boolean
VectorLayer
  initInDrawingToolbar : Boolean
VectorLayer
  initOutDrawingToolbar : Boolean
VectorLayer
 InheritedinRange : Boolean
[read-only] Is this layer currently in range, based on its min and max resolutions
Layer
 InheritedisFixed : Boolean
Whether or not the layer is a fixed layer.
Layer
 InheritedloadComplete : Boolean
[read-only] Whether or not the layer is loading data
Layer
  map : Map
[override]
VectorLayer
 InheritedmaxExtent : Bounds
Maximum extent for this layer.
Layer
 InheritedmaxResolution : Resolution
Maximal valid resolution for this layer
Layer
 InheritedmetaData : Object
Allows to add custom metadata about the layer
Layer
 InheritedminResolution : Resolution
Minimal valid resolution for this layer
Layer
 Inheritedname : String
[override] The layer Name (appears in LayerManager for example)
Layer
 InheritednumZoomLevels : Number
[read-only] Number of zoom levels (resolutions array length)
Layer
 Inheritedoriginators : Vector.<DataOriginator>
The list of originators for the layer.
Layer
 Inheritedprojection : ProjProjection
The projection of the map.
Layer
 Inheritedproxy : String
Proxy (usually a PHP, Python, or Java script) used to request remote servers like WFS servers in order to allow crossdomain requests.
Layer
 Inheritedresolutions : Array
A list of map resolutions (map units per pixel) in descending order.
Layer
 Inheritedsecurity : ISecurity
Security manager associated to this layer
Layer
 Inheritedselected : Boolean
Layer
  selectedFeatures : Vector.<String>
VectorLayer
  style : Style
VectorLayer
 Inheritedurl : String
The url use for the layer request if necessary.
Layer
 Inheritedvisible : Boolean
[override] [write-only] Define if this layer is visible (displayed) or not
Layer
 Inheritedzindex : int
Current layer position in the display list
Layer
Protected Properties
 PropertyDefined By
 Inherited_autoResolution : Boolean = true
Layer
 Inherited_centerChanged : Boolean = false
Layer
 Inheritedloading : Boolean
[write-only] Used to set loading status of layer
Layer
 Inherited_mapReload : Boolean = false
Layer
 Inherited_projection : ProjProjection = null
Layer
 Inherited_projectionChanged : Boolean = false
Layer
 Inherited_resolutionChanged : Boolean = false
Layer
Public Methods
 MethodDefined By
  
VectorLayer(name:String)
VectorLayer
  
addFeature(feature:Feature, dispatchFeatureEvent:Boolean = true, reproject:Boolean = true):void
Add Feature to the layer.
VectorLayer
  
addFeatures(features:Vector.<Feature>, reproject:Boolean = true):void
Add Features to the layer.
VectorLayer
 Inherited
addOriginator(originator:DataOriginator):void
Add a new originator for the layer
Layer
  
clear():void
[override]
VectorLayer
  
destroy():void
[override]
VectorLayer
 Inherited
generateResolutions(numZoomLevels:uint, nominalResolution:Number):void
Generate resolutions array for a nominal resolution (higher one) and a number of zoom levels.
Layer
 Inherited
getLayerPxFromMapPx(mapPx:Pixel):Pixel
Layer
 Inherited
getLocationFromMapPx(viewPortPx:Pixel):Location
Return a LonLat which is the passed-in map Pixel, translated into lon/lat by the layer.
Layer
 Inherited
getMapPxFromLayerPx(layerPx:Pixel):Pixel
Layer
 Inherited
getMapPxFromLocation(lonlat:Location):Pixel
Return a Pixel which is the passed-in LonLat,translated into map pixels.
Layer
 Inherited
getURL(bounds:Bounds):String
Return layer URL
Layer
 Inherited
hasMultiBBoxes():Boolean
Tells whether this layer defines multiple bounding boxes
Layer
 Inherited
isAvailableForBounds(bounds:Bounds, resolution:Resolution):Boolean
This method tells if the layer is available for the specified bounds and resolution
Layer
  
redraw(fullRedraw:Boolean = false):void
[override]
VectorLayer
 Inherited
Remove map related event listeners
Layer
  
removeFeature(feature:Feature, dispatchFeatureEvent:Boolean = true):void
VectorLayer
  
removeFeatures(features:Vector.<Feature>):void
VectorLayer
  
reset():void
[override]
VectorLayer
  
VectorLayer
  
supportsProjection(compareProj:*):Boolean
[override]
VectorLayer
Protected Methods
 MethodDefined By
  
draw():void
[override]
VectorLayer
 Inherited
onEnterFrame(event:Event):void
Bind the redraw of the layers on the flash onEnterFrame
Layer
 Inherited
This function is call when the MapEvent.CENTER_CHANGED Call the redraw function to check if the layer can be displayed Override this method if you want a specific behaviour in your layer when the center is changed
Layer
 Inherited
Layer
 Inherited
This function is call when the MapEvent.PROJECTION_CHANGED Override this method if you want a specific behaviour in your layer when the projection of the map is changed
Layer
 Inherited
onMapReload(event:MapEvent):void
This function is call when the MapEvent.RELOAD Override this method if you want a specific behaviour in your layer when the map ask for a reload.
Layer
 Inherited
This function is call when the MapEvent.RESIZE Call the redraw method to fully actualize the layer Override this method if you want a specific behaviour in your layer when the size of the map is changed
Layer
 Inherited
This function is call when the MapEvent.RESOLUTION_CHANGED Override this method if you want a specific behaviour in your layer when the resolution of the map is changed
Layer
 Inherited
This function is call when the MapEvent.MAX_EXTENT_CHANGED Call the redraw method to fully actualize the layer Override this method if you want a specific behaviour in your layer when the MaxExtent of the map is changed
Layer
 Inherited
Layer
Public Constants
 ConstantDefined By
 InheritedDEFAULT_DPI : Number = 92
[static]
Layer
 InheritedDEFAULT_NOMINAL_RESOLUTION : Resolution
[static]
Layer
 InheritedDEFAULT_NUM_ZOOM_LEVELS : uint = 18
[static]
Layer
 InheritedDEFAULT_PROJECTION : ProjProjection
[static]
Layer
 InheritedRESOLUTION_TOLERANCE : Number = 0.000001
[static]
Layer
Property Detail
attributesIdproperty
attributesId:Vector.<String>


Implementation
    public function get attributesId():Vector.<String>
    public function set attributesId(value:Vector.<String>):void
availableproperty 
available:Boolean  [read-only] [override]


Implementation
    public function get available():Boolean
dataproperty 
data:XML

If the VectorLayer is made from locale source : the XML data


Implementation
    public function get data():XML
    public function set data(value:XML):void
editableproperty 
editable:Boolean


Implementation
    public function get editable():Boolean
    public function set editable(value:Boolean):void
featuresproperty 
features:Vector.<Feature>  [read-only]

The list of features contained by this layer


Implementation
    public function get features():Vector.<Feature>
featuresBboxproperty 
featuresBbox:Bounds


Implementation
    public function get featuresBbox():Bounds
    public function set featuresBbox(value:Bounds):void
featuresIDproperty 
featuresID:Vector.<String>  [read-only]


Implementation
    public function get featuresID():Vector.<String>
geometryTypeproperty 
geometryType:String


Implementation
    public function get geometryType():String
    public function set geometryType(value:String):void
idLabelproperty 
idLabel:uint


Implementation
    public function get idLabel():uint
    public function set idLabel(value:uint):void
idPathproperty 
idPath:uint


Implementation
    public function get idPath():uint
    public function set idPath(value:uint):void
idPointproperty 
idPoint:uint


Implementation
    public function get idPoint():uint
    public function set idPoint(value:uint):void
idPolygonproperty 
idPolygon:uint


Implementation
    public function get idPolygon():uint
    public function set idPolygon(value:uint):void
inEditionModeproperty 
inEditionMode:Boolean


Implementation
    public function get inEditionMode():Boolean
    public function set inEditionMode(value:Boolean):void
initInDrawingToolbarproperty 
initInDrawingToolbar:Boolean


Implementation
    public function get initInDrawingToolbar():Boolean
    public function set initInDrawingToolbar(value:Boolean):void
initOutDrawingToolbarproperty 
initOutDrawingToolbar:Boolean


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


Implementation
    public function get map():Map
    public function set map(value:Map):void
selectedFeaturesproperty 
selectedFeatures:Vector.<String>


Implementation
    public function get selectedFeatures():Vector.<String>
    public function set selectedFeatures(value:Vector.<String>):void
styleproperty 
style:Style


Implementation
    public function get style():Style
    public function set style(value:Style):void
Constructor Detail
VectorLayer()Constructor
public function VectorLayer(name:String)



Parameters
name:String
Method Detail
addFeature()method
public function addFeature(feature:Feature, dispatchFeatureEvent:Boolean = true, reproject:Boolean = true):void

Add Feature to the layer.

Parameters

feature:Feature — The feature to add
 
dispatchFeatureEvent:Boolean (default = true)
 
reproject:Boolean (default = true)

addFeatures()method 
public function addFeatures(features:Vector.<Feature>, reproject:Boolean = true):void

Add Features to the layer.

Parameters

features:Vector.<Feature> — array
 
reproject:Boolean (default = true)

clear()method 
override public function clear():void

destroy()method 
override public function destroy():void

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

redraw()method 
override public function redraw(fullRedraw:Boolean = false):void

Parameters

fullRedraw:Boolean (default = false)

removeFeature()method 
public function removeFeature(feature:Feature, dispatchFeatureEvent:Boolean = true):void

Parameters

feature:Feature
 
dispatchFeatureEvent:Boolean (default = true)

removeFeatures()method 
public function removeFeatures(features:Vector.<Feature>):void

Parameters

features:Vector.<Feature>

reset()method 
override public function reset():void

resetFeaturesPosition()method 
public function resetFeaturesPosition():void

supportsProjection()method 
override public function supportsProjection(compareProj:*):Boolean

Parameters

compareProj:*

Returns
Boolean