- URL:
- https://<mapservice-url>/identify
- Methods:
GET- Required Capability:
- Query
- Version Introduced:
- 9.3
Description
The identify operation is performed on a map service resource to discover features at a geographic location. The result of this operation is an identify results resource. Each identified result includes its name, layer ID, layer name, geometry and geometry type, and other attributes of that result as name-value pairs.
New at 10.9
Supports the following new parameters. These parameters are only supported by map services published from ArcGIS Pro.
-
time—Control whether you want to include or exclude start and end values specified in theRelation timeparameter.
New at 10.8
Supports the following new parameters. These parameters are only supported by map services published from ArcGIS Pro.
-
clipping—Mask out layers outside of a clip polygon. -
spatial—Draw or query only features that meet the spatial filter criteria.Filter
New at 10.6.1
The operation supports the following new parameter:
historic—Queries from a given moment in an archive-enabled layerMoment
New at 10.5
The operation was enhanced with the following Boolean flags to support returning unformatted values and field names:
returnUnformatted Values returnField Name
The operation supports the following new parameters:
datum—Provide a desired datum transformation to be applied while features are projected.Transformations map—Set values to ranges applicable to all layers with same ranges in the map service.Range Values layer—Set range values specific layers.Range Values layer—Set values to parameterized filters to specific layers.Parameter Values
New at 10.1
- Support for dynamic layers was added with the
dynamicparameter. When usingLayers dynamic, defineLayers definitionandExpression layerwithin dynamic layer definition. Use theTime Options layersproperty to specify whether only the top result or all results are to be returned in the identify result. Only those layers that are defined indynamicare used in theLayers identifyoperation. The layer list inlayersis ignored. Layer order is based on the order ofdynamicelements in theLayer dynamicarray; the firstLayers dynamicis on top of the secondLayer dynamic.Layer - The
gdbparameter was introduced. Use this parameter to specify the geodatabase version.Version - The
geometryparameter was introduced. This option can be used to specify the number of decimal places in the response geometries returned by thePrecision identifyoperation. - The
returnandZ returnparameters were introduced. If true, the parameters return z- and m-values, respectively.M - JSON response contains an optional property,
exceeded. This property will be true only if the number of records exceeds the maximum number configured by the server administrator.Transfer Limit - If map service resource lists
hasas true, identify operations will default the value for theLive Data timeparameter to be [<current server time -default>, <current server time>].Time Window
New at 10.0
Support for generalizing geometries returned by the identify operation was added. You can provide arguments to the identify operation as query parameters defined in the parameters table below.
Request parameters
| Parameter | Details |
|---|---|
(Required) | The geometry to identify on. The type of the geometry is specified by the Syntax Examples |
| The type of geometry specified by the geometry parameter. The geometry type could be a point, line, polygon, or envelope. The default geometry type is a point ( Values: |
| The well-known ID of the spatial reference of the input and output geometries as well as the |
| Allows you to filter the features of individual layers in the exported map by specifying definition expressions for those layers. A definition expression for a layer that is published with the service will be always honored. Syntax Example |
| The time instant or the time extent of the features to be identified. Syntax Examples |
(Time Relation) | Allows you to control whether to include or exclude features that are at the beginning or the end of a time window. The default value is Syntax Example |
| The time options per layer. Users can indicate whether the layer should use the time extent specified by the Syntax Example |
| The layers to perform the
You can either specify the layer options as mentioned above by themselves or specify the layer option in conjunction with a list of layer IDs. When both the layer option and the layer IDs are specified, the server treats it as a Boolean AND operator. For example, if the parameter is specified as Syntax Examples |
(Required) | The distance in screen pixels from the specified Example |
(Required) | The extent or bounding box of the map currently being viewed. Unless the Syntax Example |
(Required) | The screen image display parameters (width, height, and DPI) of the map being currently viewed. The Syntax Example |
| If Values: |
| This option can be used to specify the maximum allowable offset to be used for generalizing geometries returned by the Example |
| This option was added at 10.1. This option can be used to specify the number of decimal places in the response geometries returned by the Example |
| This option was added at 10.1. Use the Syntax Example |
| This option was added at 10.1. If Values: |
| This option was added at 10.1. If Values: |
| This option was added at 10.1. Switch map layers to point to an alternate geodatabase version. Syntax Example |
| This option was added at 10.5. If Values: |
| This option was added at 10.5. If Values: |
| This option was added at 10.5. Use this parameter to apply one or more datum transformations to the map when For a list of valid datum transformation ID values and well-known text strings, see Using spatial references. For more information on datum transformation, see the Syntax Examples |
| This option was added at 10.5. It allows you to filter features in the exported map from all layers that are within the specified range instant or extent. Example |
| This option was added at 10.5. It allows you to filter features for each individual layer that are within the specified range instant or extent. Syntax Example |
| This option was added at 10.5. It allows you to filter the features of individual layers by specifying values to an array of preauthored parameterized filters for those layers. When a value is not specified for any parameter in a request, the default value that is assigned during authoring time is used instead. When a Syntax Example |
| This option was added at 10.6.1. It specifies features from the historic moment to identify. This parameter applies only if the layer is archiving enabled and the Syntax Example |
| This parameter was added at 10.8. It allows you to mask out layers outside of the clip polygon in the exported map. Clipping can mask out any layer type, such as feature layers, raster layers, and TIN layers. Optionally, use Syntax Example |
| This parameter was added at 10.8. It allows you to filter out features from all feature layers based on the input spatial filter. It is similar to Syntax Example |
| The response format. The default response format is Values: |
Example usage
Example 1: Identify that includes geometry using simple point syntax, tolerance, map extent, and image display. Default values for geometry type, spatial reference, layers, and returnGeometry are used. The response is in HTML format:
https://organization.example.com/<context>/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/identify?geometryType=esriGeometryPoint&geometry=-120,40&tolerance=10&mapExtent=-119,38,-121,41&imageDisplay=400,300,96Example 2: Identify that includes geometry using a JSON structure. The response is in JSON format:
https://organization.example.com/<context>/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/identify?geometryType=esriGeometryPoint&geometry={x: -120, y:40}&tolerance=10&mapExtent=-119,38,-121,41&imageDisplay=400,300,96&f=jsonExample 3: Identify that specifies a specific layer. In this example, only layer 2 is desired. Since this is not the top layer, the syntax layer=all is used:
https://organization.example.com/<context>/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/identify?geometryType=esriGeometryPoint&geometry={x: -120, y:40}&layers=all:2&tolerance=10&mapExtent=-119,38,-121,41&imageDisplay=400,300,96&returnGeometry=trueExample 4: Identify operation using dynamic :
https://organization.example.com/<context>/rest/services/Census/MapServer/identify?geometry={"rings":[[[-406686.615,151348.621],[-277679.963,210564.789],[-152903.038,82615.569],[-334781.268,46662.895],[-406686.615,151348.621]]],"spatialReference":{"wkid":102003}}&geometryType=esriGeometryPolygon&sr=102003&layers=all&layerDefs=&time=&layerTimeOptions=&tolerance=2&mapExtent=-574325.931693231,-211967.870311805,154917.862982949,393469.077966946&imageDisplay=1056,816,96&returnGeometry=true&maxAllowableOffset=&dynamicLayers=[{"id":101,"source":{"type":"mapLayer","mapLayerId":3}}]&returnZ=false&returnM=false&gdbVersion=&f=pjsonJSON Response syntax
{
"results": [
{
"layerId": <layerId1>,
"layerName": "<layerName1>",
"value": "<value1>",
"displayFieldName": "<displayFieldName1>",
"attributes": {
"<fieldName11>": <fieldValue11>,
"<fieldName12>": <fieldValue12>
},
"geometryType": "<geometryType1>",
"hasZ": <true|false>, //added in 10.1
"hasM": <true|false>, //added in 10.1
"geometry": {<geometry1>}
},
{
"layerId": <layerId2>,
"layerName": "<layerName2>",
"value": "<value2>",
"displayFieldName": "<displayFieldName1>",
"attributes": {
"<fieldName21>": <fieldValue21>,
"<fieldName22>": <fieldValue22>
},
"geometryType": "<geometryType2>",
"hasZ": <true|false>, //added in 10.1
"hasM": <true|false>, //added in 10.1
"geometry" : {<geometry2>}
}
]
}JSON Response example
{
"results": [
{
"layerId": 3,
"layerName": "Cities",
"value": "Joe City",
"displayFieldName": "City Name",
"attributes": {
"City Name": "Joe City",
"CLASS": "city",
"ST": "CA"
},
"geometryType": "esriGeometryPoint",
"geometry": {
"x": -118.375,
"y": 34.086,
"spatialReference": {
"wkid": 4326
}
}
},
{
"layerId": 59,
"layerName": "Parcel",
"value": "Parcel 649",
"displayFieldName": "NAME",
"attributes": {
"NAME": "Parcel 649",
"SUB_REGION": "Pacific",
"STATE_ABBR": "CA"
},
"geometryType": "esriGeometryPolygon",
"geometry": {
"spatialReference": {
"wkid": 4326
},
"rings": [
[
[-118.35,32.81],
[-118.42.806],
[-118.511,32.892],
[-118.35,32.81]
]
]
}
}
]
}