This page describes an older version, please see latest API at http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/layers/supportClasses/FeatureCollection.html.
Packagecom.esri.ags.layers.supportClasses
Classpublic class FeatureCollection
InheritanceFeatureCollection Inheritance flash.events.EventDispatcher

Since : ArcGIS API for Flex 2.0

FeatureCollection is an object with a layerDefinition and a featureSet. The feature collection is used when you want to initialize the FeatureLayer with features from outside of ArcGIS Server. The feature layer, when initialized with a featureCollection has the following behavior:

See also

com.esri.ags.layers.FeatureLayer
Live sample - Using feature collection


Public Properties
 PropertyDefined By
  featureSet : FeatureSet
The feature set of the Feature Layer (if layer has FeatureCollection).
FeatureCollection
  layerDefinition : LayerDetails
The layer definition of the Feature Layer (if layer has FeatureCollection).
FeatureCollection
Public Methods
 MethodDefined By
  
FeatureCollection(featureSet:FeatureSet = null, layerDefinition:LayerDetails = null)
Creates a new FeatureCollection.
FeatureCollection
Property Detail
featureSetproperty
featureSet:FeatureSet

The feature set of the Feature Layer (if layer has FeatureCollection).

This property can be used as the source for data binding.


Implementation
    public function get featureSet():FeatureSet
    public function set featureSet(value:FeatureSet):void
layerDefinitionproperty 
layerDefinition:LayerDetails

The layer definition of the Feature Layer (if layer has FeatureCollection).

This property can be used as the source for data binding.


Implementation
    public function get layerDefinition():LayerDetails
    public function set layerDefinition(value:LayerDetails):void
Constructor Detail
FeatureCollection()Constructor
public function FeatureCollection(featureSet:FeatureSet = null, layerDefinition:LayerDetails = null)

Creates a new FeatureCollection.

Parameters
featureSet:FeatureSet (default = null) — The feature set.
 
layerDefinition:LayerDetails (default = null) — The layer definition.