Description
A collection of features returned from ArcGIS Server or used as input to tasks. Each feature in the FeatureSet may contain geometry, attributes, symbolgy, and an InfoTemplate. If the FeatureSet does not contain geometry, and only contains attributes, the FeatureSet can be treated as a table where each feature is a row object. Tasks that return FeatureSet include
QueryTask,
Geoprocessor, and
RouteTask. In addition, Geoprocessor and RouteTask may require FeatureSet as input.
Class hierarchy
esri.tasks.FeatureSet
Subclasses
DirectionsFeatureSet Constructor
Properties
| displayFieldName |
String
|
The name of the layer's primary display field. The value of this property matches the name of one of the fields of the feature. Only applicable when the FeatureSet is returned from a task. It is ignored when the FeatureSet is used as input to a geoprocessing task. |
| features |
Graphic[]
|
The array of graphics returned. |
| fieldAliases |
Object
|
Set of name-value pairs for the attribute's field and alias names. |
| geometryType |
String
|
The geometry type of the FeatureSet. |
| spatialReference |
SpatialReference
|
When a FeatureSet is used as input to Geoprocessor, the spatial reference is set to the map's spatial reference by default. This value can be changed. When a FeatureSet is returned from a task, the value is the result as returned from the server. See Projected Coordinate Systems and Geographic Coordinate Systems for the list of supported spatial references. |
Constructor Detail
Creates a new FeatureSet object. The constructor takes no parameters.
esri.tasks.FeatureSet(json)
Creates a new FeatureSet object using a JSON object. (As of v1.3)
Parameters:
|
<Object>
json |
Required |
A JSON object that contains feature set.
|
Properties Detail
<String> displayFieldName
The name of the layer's primary display field. The value of this property matches the name of one of the fields of the feature. Only applicable when the FeatureSet is returned from a task. It is ignored when the FeatureSet is used as input to a geoprocessing task.
The array of graphics returned.
Code snippets:
var features= [];
features.push(graphic);
var featureSet = new esri.tasks.FeatureSet();
featureSet.features = features;
Set of name-value pairs for the attribute's field and alias names.
The geometry type of the FeatureSet.
When a FeatureSet is used as input to
Geoprocessor, the spatial reference is set to the map's spatial reference by default. This value can be changed. When a FeatureSet is returned from a task, the value is the result as returned from the server. See
Projected Coordinate Systems and
Geographic Coordinate Systems for the list of supported spatial references.