Feature layer selection

Description

This sample demonstrates how to select features in a feature layer. Just tap on a feature on the map to select it and you will see it highlighted with the cyan color.

How it works

AGSMapViewDelegate provides a method called mapView:didTapAtPoint:mapPoint:, which is fired every time the user taps on the map. The app uses the mapPoint passed in the method and creates an envelope around that point based on the tolerance. It then creates an AGSQueryParameter object and sets it geometry property to the envelope it just created. This query parameter object signifies all the features present in that area/envelope. It then calls the selectFeaturesWithQuery by passing the query object to select those features.


In this topic
  1. Description