Search and query tasks
In this topic
Search operations that find and display reports of real-world objects, collect geographic information, and analyze data presented on a map, can be achieved using tasks. These tasks provide the foundation of the geospatial functionality that you can add to your application.
This API includes the following task types:
- Query—Gets features from map services that satisfy attribute or spatial queries
- Identify—Gets features from map services at a location
- Find—Gets features from map services that contain a particular value in their attributes
- GeometryEngine—Performs geometric operations such as buffering, projecting, and simplifying
- Geoprocessor—Performs complex GIS analysis by executing geoprocessing models published as geoprocessing services
- Locator—Matches locations to addresses and vice-versa
- Route task—Computes point-to-point or multipoint routes and driving directions
Working with tasks
These task classes are specifically designed to help you extract information from ArcGIS for Server services and runtime local data. All of these tasks can be executed synchronously or asynchronously if you want your application to remain responsive during execution. Your choice of execution will depend on the speed and complexity of the task that is being executed, as well as the level of responsiveness you require for your application. For example, a geoprocessing task analyzing a large dataset will take much longer than a simple identify task analyzing one layer in a map service.
While the functionality of each task varies, all tasks follow the same basic pattern. To allow users of your application to interact with a task, each task uses the following steps:
- Provide an interface for specifying the task's input and displaying the task's results.
- Instantiate the task class and pass the URL of the service or layer that the task will use.
- Specify the input parameters to the task.
- Execute the task synchronously or asynchronously.
- Listen for the completion of the task and present the results.