Geometry collection events and methods

CollectFeaturesTask geometry collection methods

The built-in CollectFeaturesTask provides a set of geometry collection methods by default. You can get the collection by calling the CollectFeaturesTask.EditFeatureAttributesPage.GeometryCollectionViewModel.GeometryCollectionMethods property.

By default, it contains the following built-in geometry collection methods:

If you create a custom geometry collection method that inherits GeometryCollectionMethod, it will also be included in the GeometryCollectionMethods collection.

Active geometry collection method

To check the geometry collection method currently being used , use CollectFeaturesTask.EditFeatureAttributesPage.EditFeatureAttributesViewModel.GeometryCollectionViewModel.GetCollectionMethodInProgress(). If there is no geometry collection method in progress, this method will return null.

You can also get an active custom GeometryCollectionMethod if that method inherits GeometryCollectionMethod.

Geometry collection method in progress (true/false)

To determine if a geometry collection method is in progress, for example, to see if a user is in the middle of GPS streaming, check the GeometryCollectionMethod.GeometryMethodInProgress property. It returns true if any one of the following GeometryCollectionMethods is being used:

Geometry collection started/completed/cancelled notification

You can run custom code when a geometry collection method progresses, including started, cancelled, and completed. For each of the built-in GeometryCollectionMethods, and for any other custom GeometryCollectionMethod that inherits GeometryCollectionMethod class, you can listen to the GeometryCollectionMethod.GeometryCollectionProgress event. For each GeometryCollectionMethod, this event is raised once a user starts geometry collection, cancels geometry collection, or completes geometry collection. This is where you can extend the application by applying additional geometry validation, or anything that's needed for your organization's data collection practice.

1/7/2015