Building and executing IdentifyTask

IdentifyTask can operate on multiple layers in a map service and fetch information from all the features intersecting with a given geometry. We will use IdentifyTask to click on the map and get the value of the wildfire potential at the clicked location. To execute IdentifyTask, we need to follow three steps:

  1. Instantiate IdentifyTask.
  2. Construct the Identify parameters.
  3. Execute IdentifyTask.

Instantiating IdentifyTask

Instantiating IdentifyTask involves loading the required module and instantiating it with a map service URL. The modules required for executing IdentifyTask are the following:

  • esri/tasks/IdentifyTask
  • esri/tasks/IdentifyParameters

We will be operating IdentifyTask on the Wildfire Potential Map service. ...

Get ArcGIS for JavaScript Developers by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.