Packagecom.esri.ags
Classpublic class FeatureSet
InheritanceFeatureSet Inheritance flash.events.EventDispatcher
Implements IJSONSupport
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
  exceededTransferLimit : Boolean
Typically a layer has a limit on the number of features (i.e., records) returned by the query operation.
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
  hasM : Boolean
True if the feature's geometry includes m coordinate values.
FeatureSet
  hasZ : Boolean
True if the feature's geometry includes z coordinate values.
FeatureSet
  spatialReference : SpatialReference
The spatial reference of the features.
FeatureSet
Public Methods
 MethodDefined By
  
FeatureSet(features:Array = null)
Creates a new FeatureSet.
FeatureSet
  
fromJSON(obj:Object):FeatureSet
[static] Convert from JSON object to FeatureSet.
FeatureSet
  
toJSON(key:String = null):Object
Convert this FeatureSet to a JSON object.
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
exceededTransferLimitproperty 
exceededTransferLimit:Boolean

Since : ArcGIS API 3.0 for Flex

Typically a layer has a limit on the number of features (i.e., records) returned by the query operation. If maxRecordCount is configured for a layer, exceededTransferLimit will be true if a query matches more than maxRecordCount features and hence the server returned a feature set with up to maxRecordCount features, false otherwise. Requires ArcGIS 10.1 or later.

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


Implementation
    public function get exceededTransferLimit():Boolean
    public function set exceededTransferLimit(value:Boolean):void

See also

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

hasMproperty 
hasM:Boolean

Since : ArcGIS API 3.0 for Flex

True if the feature's geometry includes m coordinate values.

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


Implementation
    public function get hasM():Boolean
    public function set hasM(value:Boolean):void
hasZproperty 
hasZ:Boolean

Since : ArcGIS API 3.0 for Flex

True if the feature's geometry includes z coordinate values.

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


Implementation
    public function get hasZ():Boolean
    public function set hasZ(value:Boolean):void
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
fromJSON()method
public static function fromJSON(obj:Object):FeatureSet

Convert from JSON object to FeatureSet. If you have a JSON formatted string, you can first call JSONUtil.decode() to get a JSON object.

Parameters

obj:Object — JSON object.

Returns
FeatureSet — a new FeatureSet

See also

toJSON()method 
public function toJSON(key:String = null):Object

Convert this FeatureSet to a JSON object. If you need a JSON formatted string, you can pass this FeatureSet directly to JSONUtil.encode().

Parameters

key:String (default = null) — Unused but required for compatibility with JSON.stringify().

Returns
Object — JSON object

See also