Querying and searching overview
Your users may require additional geospatial functionality that goes beyond simple map display and interaction, such as, querying information on the map, finding and display reports of real world objects, or performing analysis. You can acheive this by adding one or more of the following tasks to your ArcGIS Runtime SDK for WPF application. To help you choose the task appropriate for your needs here is a brief summary of each task:
Identify Task
Return features from a local or online map service at a specific location on a Map. This search can be performed using a specific geometry with a given tolerance on any number of layers in the map service. You could develop a tool to allow you to click on features of a map and then display the attributes and any related attributes of those features. For more information please refer to Identifying Features on the Map.
Find Task
The Find task allows you to search one or more layers in a map for features with attribute values that match or contain an input value. For more information please refer to Finding Features in the Map.
Query Task
Retrieve features from a local or online map service that satisfy either an attribute and/or spatial query using the Query Task. For more information please refer to Querying the Map.
Locator Task
You can either find the geographic location of an address (geocode) or the address of a geographic location (reverse geocode) using the Locator Task. This operation can be performed using either online geoprocessing services or local geoprocessing packages. For more information please refer to Finding an Address.
Route Task
The Route Task solve routes and provides directions between a defined set of stops while taking into account parameters such as barriers, stop order optimization, time windows, U-turn restrictions, and impedance. This task currently operates with online services. For more information please refer to Creating applications using Routing.
Geoprocessor Task
You can perform complex GIS analysis by executing geoprocessing models that have been published online as geoprocessing services or packaged into a geoprocessing package and accessed locally. For more information please refer to What is geoprocessing?
Working with Tasks
These task classes are specifically designed to help you to extract information from ArcGIS for Server services and runtime local services. Any of these task can be executed either synchronously or asynchronously if you wish your application to remain responsive during it's execution. Your choice of execution will depend on the speed and complexity of the task that is being executed and what level of responsiveness you require for your application. For example, a Geoprocessing Task analysing a large dataset will take much longer than a simple Identify Task analysing one layer in a map service.
While the functionality of the each task varies, all tasks follow the same basic pattern. To allow users of your application to interact with a task each task follows the same 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.