Class: IdentifyTaskE-mail This Topic Printable Version Give Us Feedback

Description

Performs an identify operation on the layers of a map service resource exposed by the ArcGIS Server REST API.

Class hierarchy

esri.tasks.IdentifyTask

Constructor

Constructor Description
esri.tasks.IdentifyTask(url) Creates a new IdentifyTask object. A URL is a required parameter.

Properties

Property Type Description
url String URL to the ArcGIS Server REST resource that represents a map service. To obtain the URL, use Services Directory.

Methods

Method Return Value Description
execute(identifyParameters, callback?, errback?) dojo.Deferred Sends a request to the ArcGIS REST map service resource to identify features based on the IdentifyParameters specified in the identifyParameters argument. On completion, the onComplete event is fired and the optional callback function is invoked.

Events

Event Description
onComplete(identifyResults) Fires when the identify operation is complete.
onError(error) Fires when an error occurs when executing the task.
Constructor Detail

esri.tasks.IdentifyTask(url)

Creates a new IdentifyTask object. A URL is a required parameter.
Parameters:
<String> url Required URL to the ArcGIS Server REST resource that represents a map service. An example is http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Portland/Portland_ESRI_LandBase_AGO/MapServer. For more information on constructing a URL, see The Services Directory and the REST API.
Properties Detail

<String> url

URL to the ArcGIS Server REST resource that represents a map service. To obtain the URL, use Services Directory.
Methods Detail

execute(identifyParameters, callback?, errback?)

Sends a request to the ArcGIS REST map service resource to identify features based on the IdentifyParameters specified in the identifyParameters argument. On completion, the onComplete event is fired and the optional callback function is invoked.

The return object of dojo.Deferred was added at v1.4.
Return value: dojo.Deferred
Input Parameters:
<IdentifyParameters> identifyParameters Required Specifies the criteria used to identify the features.
<Function> callback Optional The function to call when the method has completed. The arguments in the function are the same as the onComplete event.
<Function> errback Optional An error object is returned if an error occurs on the Server during task execution. (As of v1.3)
See also:
onComplete   onError  

Events Detail

onComplete(identifyResults)

Fires when the identify operation is complete.
Arguments:
<IdentifyResult[]> identifyResults The result of an identify operation.
See also:
execute  

onError(error)

Fires when an error occurs when executing the task. (As of v1.3)
Arguments:
<Error> error ArcGIS Server error message returned in a JavaScript error object.
See also:
execute