Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/workers
Class: IdentifyParameters

require(["esri/tasks/IdentifyParameters"], function(IdentifyParameters) { /* code goes here */ });

Description

(Added at v1.0)
This data object is used as the identifyParameters argument to IdentifyTask.execute method. It specifies the criteria used to identify the features.

Samples

Search for samples that use this class.

Constructors

NameSummary
new IdentifyParameters()Creates a new IdentifyParameters object.

Constants

NameDescription
LAYER_OPTION_ALLAll layers are identified, even if they are not visible. Performance note: if your service has many layers, a request using ths option will not perform well. A visible layer means you can see it in the map at the current extent. If a layer is turned off or not in range based on its scale dependency settings, it cannot be identified.
LAYER_OPTION_TOPOnly the top-most visible layer is identified.
LAYER_OPTION_VISIBLEAll visible layers are identified.

Properties

NameTypeSummary
dpiNumberResolution of the current map view in dots per inch.
dynamicLayerInfosDynamicLayerInfo[]An array of DynamicLayerInfos used to change the layer ordering or redefine the map.
geometryGeometryThe geometry used to select features during Identify.
geometryPrecisionNumberSpecifies the number of decimal places for the geometries returned by the query operation.
heightNumberHeight of the map currently being viewed in pixels.
layerDefinitionsString[]Array of layer definition expressions that allows you to filter the features of individual layers.
layerIdsNumber[]The layers to perform the identify operation on.
layerOptionStringSpecifies which layers to use when using Identify.
layerTimeOptionsLayerTimeOptions[]Array of LayerTimeOptions objects that allow you to define time options for the specified layers.
mapExtentExtentThe Extent or bounding box of the map currently being viewed.
maxAllowableOffsetNumberThe maximum allowable offset used for generalizing geometries returned by the identify operation.
returnGeometryBooleanIf "true", the result set includes the geometry associated with each result.
spatialReferenceSpatialReferenceThe spatial reference of the input and output geometries as well as of the mapExtent.
timeExtentTimeExtentSpecify the time extent used by the identify task.
toleranceNumberThe distance in screen pixels from the specified geometry within which the identify should be performed.
widthNumberWidth of the map currently being viewed in pixels.
Constructor Details

new IdentifyParameters()

Creates a new IdentifyParameters object. The constructor takes no parameters.
Sample:
require([
  "esri/tasks/IdentifyParameters", ... 
], function(IdentifyParameters, ... ) {
  var identifyParams = new IdentifyParameters();
  ...
});
Property Details

<Number> dpi

Resolution of the current map view in dots per inch.
Default value: 96

<DynamicLayerInfo[]> dynamicLayerInfos

An array of DynamicLayerInfos used to change the layer ordering or redefine the map. When set the Identify operation will perform the identify against the dynamic layers. (Added at v2.7)

<Geometry> geometry

The geometry used to select features during Identify. The type of the geometry is specified by Geometry type. The most common geometry used with Identify is a Point.
Sample:
identifyParams.geometry = evt.mapPoint;

<Number> geometryPrecision

Specifies the number of decimal places for the geometries returned by the query operation. (Added at v3.14)
Sample:
params.geometryPrecision = 1;

<Number> height

Height of the map currently being viewed in pixels.
Sample:
require([
  "esri/map", "esri/tasks/IdentifyParams", ... 
], function(Map, IdentifyParams, ... ) {
  var map = new Map( ... );
  var identifyParams = new IdentifyParams();
  identifyParams.height = map.height;
  ...
});

<String[]> layerDefinitions

Array of layer definition expressions that allows you to filter the features of individual layers. Layer definitions with semicolons or colons are supported if using a map service published using ArcGIS Server 10.
Sample:
identifyParams.layerDefinitions[23] = "LANDUSE = 'COM'";

<Number[]> layerIds

The layers to perform the identify operation on. The layers are specified as a comma-separated list of layer ids. The list of ids is returned in ArcGISDynamicMapServiceLayer layerInfos.
Sample:
identifyParams.layerIds = [23,25];

<String> layerOption

Specifies which layers to use when using Identify. See the Constants table for valid values.
Default value: LAYER_OPTION_TOP
Sample:
require([
  "esri/tasks/IdentifyParameters", ... 
], function(IdentifyParameters, ... ) {
  identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_ALL;
  ...
});

<LayerTimeOptions[]> layerTimeOptions

Array of LayerTimeOptions objects that allow you to define time options for the specified layers. There is one object per sub-layer.
Sample:
require([
  "esri/layers/LayerTimeOptions", "esri/layers/TimeInfo", ... 
], function(LayerTimeOptions, TimeInfo, ... ) {
  var timeOption1 = new LayerTimeOptions();
  timeOption1.timeOffset = 4;
  timeOption1.timeOffsetUnits = TimeInfo.UNIT_YEARS;

  var options = [];
  options[2]= timeOption1;
  options[5] = timeOption2;
  identifyParameters.layerTimeOptions = options;
  ...
});

<Extent> mapExtent

The Extent or bounding box of the map currently being viewed. The mapExtent property is assumed to be in the spatial reference of the map unless sr has been specified.

The values for mapExtent, height, width, and dpi are used to determine the current map scale. Once the scale is known, the map service can exclude layers based on their scale dependency settings. The map service is not performing a spatial intersection based on the provided extent. These properties are also used to calculate the search distance on the map based on the tolerance in screen pixels.
Sample:
identifyParams.mapExtent = map.extent;

<Number> maxAllowableOffset

The maximum allowable offset used for generalizing geometries returned by the identify operation. The offset is in the units of the spatialReference. If a spatialReference is not defined the spatial reference of the map is used. (Added at v2.0)

<Boolean> returnGeometry

If "true", the result set includes the geometry associated with each result. The default is "false".
Known values: true | false
Default value: false
Sample:
identifyParams.returnGeometry = true;

<SpatialReference> spatialReference

The spatial reference of the input and output geometries as well as of the mapExtent. If the spatial reference is not specified, the geometry and the extent are assumed to be in the spatial reference of the map, and the output geometries will also be in the spatial reference of the map. See Projected Coordinate Systems and Geographic Coordinate Systems for the list of supported spatial references.

<TimeExtent> timeExtent

Specify the time extent used by the identify task.

<Number> tolerance

The distance in screen pixels from the specified geometry within which the identify should be performed.
Sample:
identifyParams.tolerance = 3;

<Number> width

Width of the map currently being viewed in pixels.
Sample:
require([
  "esri/map", "esri/tasks/IdentifyParams", ... 
], function(Map, IdentifyParams, ... ) {
  var map = new Map( ... );
  var identifyParams = new IdentifyParams();
  identifyParams.width  = map.width;
  ...
});