Imagine for a moment that you have multiple layers in your map or scene, and you want to click on a particular location and find everything at that location. See the following image:
If you click on these layers, the IdentifyTask
object will return every feature in every layer that is located where you clicked. The IdentifyTask
class uses the concept of a hit test. A hit test simply means that if the point where the user clicks intersects with any feature in any layer, those features are returned to IdentifyTask
. It's possible to perform an Identify
operation on both online and offline data. Let's look at an online example first, and then explore this further with the same kind of operation but with offline data.
All examples in this section are in the code provided with this book, which is called Chapter7a
.