Find versus Query versus Identify

The FindTask object is used to search one or more layers in a very similar fashion to how a database is searched using an SQL statement. For example, a database is searched using an SQL statement with a WHERE clause, like this:

USE MyDatabase;
GO
SELECT Name, ProductNumber, ListPrice AS Price
FROM Production.Product 
WHERE ProductLine = 'R' 
AND DaysToManufacture < 4
ORDER BY Name ASC;
GO

The FindTask constructor works with a single WHERE clause against these layers using a text literal. QueryTask, on the other hand, can use multiple fields and field types against a single layer. However, it goes beyond that with QueryTask. The QueryTask class can also be used for spatial queries. For example, you can also execute a query that states "find a parking meter that is on Baker Street and within 500 meters of a grocery store." In effect, QueryTask is a tool for doing spatial analysis. As such, this feature makes it a very powerful tool. Lastly, IdentifyTask is used to allow the user to interactively click on the map and retrieve information on the layers' features that they clicked on. Think of Identify as a drill-down operation. Whatever you click, the fields and their values for all layers will be returned.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.37.38