Customizing the Collect Features task
For data collection and feature inspection, the Collect Features task provides generic geometry and attribute collection methods for fieldwork. You start with a page where you pick the feature type, followed by the edit attributes page where you can perform geometry collection or attribute collection. For geometry collection, the application takes you to the geometry collection map page by activating the geometry group. The geometry collection map page provides a list of geometry collection methods depending on the feature's geometry type. For convenience, you can collect a point feature's location using GPS directly from the edit attributes page. Attribute collection is pretty straightforward, allowing you to tap a field (represented by a group) to activate the data entry page. After both geometry and attributes have been collected, you save and finish. This typically completes a data collection process.
The following screen captures show a typical data collection workflow as defined by the Collect Features task:
Notification when feature collection begins and ends
CollectFeaturesTask provides two events that will be raised: CollectionStarted, when collection of a new feature begins, and CollectionCompleted when collection of a new feature is completed.
In data collection, after you select a feature type, the CollectionStarted event is fired. You can get a reference to the new feature being collected from the CollectFeaturesTask.Feature property. Similarly, the CollectionCompleted event will be raised either after the collection of the new feature has finished or if the feature collection is canceled.
Adding and Removing geometry collection methods
The Collect Features task provides a basic set of geometry collection methods used by field workers. If your field data collection requires a new geometry collection method, you can do so within the application framework. You can implement your own geometry collection method and add it to the Geometry Collection map page. To add your method to the GeometryCollectionMapPage, listen to the MapPage.OnShowing event. If the current map page is the Geometry Collection map page, you can add a tool widget and/or a rocker menu item, and hook it to your own geometry collection method. You can remove the built-in geometry collection method you don't need from the ToolWidgets collection and RockerMenuItems collection. See the RandomGeometryCollection extension sample for more details.
If you don't want to use the built-in Geometry Collection map page, you can remove the geometry group from the edit attributes page and add your own geometry group, which starts your own geometry collection workflow. See the CollectGeometryExtensions sample for more details. If you choose to implement your own geometry collection method by replacing the geometry group with your own group,you may need to create a custom MapPage for visualization purpose because the built-in MapPage associated with CollectFeaturesTask won't be available.
Customizing finish collection options
You can customize FinishCollectionOptions. To customize the option list on this page, listen to the CollectFeaturesTask.CreatingFinishCollectionOptions event and add or remove options as needed. See the CollectGeometryExtensions sample for more details.
Where to get the sample
The CollectGeometryExtension sample is available for download from ArcGIS.com.