Description
A collection of features returned from ArcGIS Server or used as input to tasks. Each feature in the FeatureSet may contain geometry, attributes, symbology, 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.
Samples
Search for
samples that use this class.
Class hierarchy
esri.tasks.FeatureSet
Subclasses
DirectionsFeatureSet
Constructors
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. |
| exceededTransferLimit | Number |
|
| 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 Details
new esri.tasks.FeatureSet()
Creates a new FeatureSet object. The constructor takes no parameters.
new esri.tasks.FeatureSet(json)
Creates a new FeatureSet object using a JSON object.
Parameters:
| <Object> json | Required | A JSON object that contains feature set. |
Property Details
<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.
<Number> exceededTransferLimit
Typically a layer has a limit on the number of features (i.e. records) returned by the query operation see
FeatureLayer.maxRecordCount property. If
maxRecordCount is configured for a layer,
exceededTransferLimit will be true if a query matches more than the
maxRecordCount features false otherwise.
Supported by ArcGIS Server version 10.1 and later.
The array of graphics returned.
Code Snippet:
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.