Companion

object Companion

Functions

Link copied to clipboard
suspend fun create(utilityNetwork: UtilityNetwork, assetType: UtilityAssetType): Result<SnapRules>

Analyzes an com.arcgismaps.utilitynetworks.UtilityNetwork for the rules which allow or limit the snapping of the given com.arcgismaps.utilitynetworks.UtilityAssetType to other features, and returns a SnapRules which can be used to configure interactive snapping behavior in a GeometryEditor. To configure rule-based snapping, use this method to create a SnapRules that you can then pass to SnapSettings.syncSourceSettings. This method is ideal for creating SnapRules when you have a reference to the com.arcgismaps.utilitynetworks.UtilityAssetType, for example if you have identified an existing feature to be edited, you can call com.arcgismaps.utilitynetworks.UtilityNetwork.createElement, then get com.arcgismaps.utilitynetworks.UtilityElement.assetType to pass in.

suspend fun create(utilityNetwork: UtilityNetwork, featureTable: FeatureTable, attributes: Map<String, Any?>): Result<SnapRules>

Analyzes an com.arcgismaps.utilitynetworks.UtilityNetwork for the rules which allow or limit the snapping of a feature in the given featureTable with the given attributes, and returns a SnapRules which can be used to configure interactive snapping behavior in a GeometryEditor. To configure rule-based snapping, use this method to create a SnapRules that you can then pass to SnapSettings.syncSourceSettings. This method is ideal for creating SnapRules where you have a set of attributes, for example, if you are creating a new feature from a com.arcgismaps.data.FeatureTemplate or by using a com.arcgismaps.mapping.featureforms.FeatureForm. Connectivity rules involving the com.arcgismaps.utilitynetworks.UtilityAssetType of the feature are described by those attributes are included in the resulting rules.