Create, update, and delete features to manage a feature layer.
An end-user performing a survey may want to manage features on the map in various ways during the course of their work.
Pick an operation, then tap on the map to perform the operation at that location. Available feature management operations include: "Create feature", "Delete feature", "Update attribute", and "Update geometry".
- Create a
ServiceGeodatabase
from a URL. - Get a
ServiceFeatureTable
from theServiceGeodatabase
. - Create a
FeatureLayer
derived from theServiceFeatureTable
instance. - Update the
GeoViewTappedEvent
subscription when a feature management operation is selected. - Apply the feature management operation upon tapping the map.
- Create features: create a
Feature
with attributes and a location using theServiceFeatureTable
. - Delete features: delete the selected
Feature
from theFeatureTable
. - Update attribute: update the attribute of the selected
Feature
. - Update geometry: update the geometry of the selected
Feature
.
- Create features: create a
- Update the
FeatureTable
locally. - Update the
ServiceGeodatabase
of theServiceFeatureTable
by callingApplyEditsAsync()
.- This pushes the changes to the server.
- Feature
- FeatureEditResult
- FeatureLayer
- ServiceFeatureTable
- ServiceGeodatabase
When editing feature tables that are subject to database behavior (operations on one table affecting another table), it's now recommended to call these methods (apply or undo edits) on the ServiceGeodatabase
object rather than on the ServiceFeatureTable
object. Using the ServiceGeodatabase
object to call these operations will prevent possible data inconsistencies and ensure transactional integrity so that all changes can be committed or rolled back.
amend, attribute, create, delete, deletion, details, edit, editing, feature, feature layer, feature table, geodatabase, information, moving, online service, service, update, updating, value