Delete features (feature service)

Description

This sample demonstrates how to delete features from a feature layer that uses a feature service. Tap on a feature on the map and the callout will show. Tap on the trash bin in the callout to delete the feature. An alert will ask for confirmation.

How it works

The sample uses the geoView:didTapAtScreenPoint:screenPoint method on AGSGeoViewTouchDelegate to get the tapped point. The features around that point are queried using the queryFeaturesWithParameters:completion: method on AGSServiceFeatureTable. A callout is shown for that feature using the showCalloutForFeature:layer:tapLocation:animated: method on mapView.callout. When the user taps on the trash icon, the feature is deleted using the deleteFeature:completion: method and the edit is applied to the service using the applyEditsWithCompletion: method.


In this topic
  1. Description