Packagecom.esri.ags
Classpublic class FeatureSet
InheritanceFeatureSet Inheritance flash.events.EventDispatcher
Subclasses DirectionsFeatureSet

A set of features with information about their fields, field aliases, geometry type, spatial reference etc. The FeatureSet is returned by QueryTask.execute() and FeatureLayer.queryFeatures() and includes not only the graphics but also the metadata about them.

Default MXML Propertyfeatures



Public Properties
 PropertyDefined By
  attributes : Array
[read-only] Array of Objects where each object holds the name-value pairs of field names and field values.
FeatureSet
  displayFieldName : String
The display field name.
FeatureSet
  features : Array
Array of graphic features.
FeatureSet
  fieldAliases : Object
The field aliases.
FeatureSet
  fields : Array
The fields.
FeatureSet
  geometryType : String
The geometry type of the feature.
FeatureSet
  spatialReference : SpatialReference
The spatial reference of the features.
FeatureSet
Public Methods
 MethodDefined By
  
FeatureSet(features:Array = null)
Creates a new FeatureSet.
FeatureSet
  
Deprecated Since ArcGIS API for Flex 2.4: Please Use fromJSON()
[static] Convert from JSON to FeatureSet.
FeatureSet
  
convertToJSON():String
Deprecated Since ArcGIS API for Flex 2.4: Please Use toJSON()
Convert this FeatureSet to a JSON formatted String.
FeatureSet
  
fromJSON(json:String):FeatureSet
[static] Convert from JSON to FeatureSet.
FeatureSet
  
toJSON():String
Convert this FeatureSet to a JSON formatted String.
FeatureSet
Property Detail
attributesproperty
attributes:Array  [read-only]

Array of Objects where each object holds the name-value pairs of field names and field values. The Objects are pointers to the Graphic.attributes property for each Graphic in the features Array. This property returns a new Array each time it is called. This property is usually bound to a DataGrid's dataProvider property. The binding is triggered whenever the features property is set.

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


Implementation
    public function get attributes():Array

See also

displayFieldNameproperty 
displayFieldName:String

The display field name.

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


Implementation
    public function get displayFieldName():String
    public function set displayFieldName(value:String):void
featuresproperty 
features:Array

Array of graphic features.

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


Implementation
    public function get features():Array
    public function set features(value:Array):void

See also

fieldAliasesproperty 
fieldAliases:Object

The field aliases.

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


Implementation
    public function get fieldAliases():Object
    public function set fieldAliases(value:Object):void
fieldsproperty 
fields:Array

The fields.

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


Implementation
    public function get fields():Array
    public function set fields(value:Array):void

See also

geometryTypeproperty 
geometryType:String

The geometry type of the feature.

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


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

See also

spatialReferenceproperty 
spatialReference:SpatialReference

The spatial reference of the features.

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


Implementation
    public function get spatialReference():SpatialReference
    public function set spatialReference(value:SpatialReference):void
Constructor Detail
FeatureSet()Constructor
public function FeatureSet(features:Array = null)

Creates a new FeatureSet.

Parameters
features:Array (default = null) — Optional array of features.
Method Detail
convertFromJSON()method
public static function convertFromJSON(json:String):FeatureSet
Deprecated Since ArcGIS API for Flex 2.4: Please Use fromJSON()

Convert from JSON to FeatureSet.

Parameters

json:String — ArcGIS JSON String

Returns
FeatureSet — a new FeatureSet
convertToJSON()method 
public function convertToJSON():String
Deprecated Since ArcGIS API for Flex 2.4: Please Use toJSON()

Convert this FeatureSet to a JSON formatted String.

Returns
String — JSON formatted String
fromJSON()method 
public static function fromJSON(json:String):FeatureSet

Convert from JSON to FeatureSet.

Parameters

json:String — ArcGIS JSON String

Returns
FeatureSet — a new FeatureSet

See also

toJSON()method 
public function toJSON():String

Convert this FeatureSet to a JSON formatted String.

Returns
String — JSON formatted String

See also