A utility network container allows a dense collection of features to be represented by a single feature, which can be used to reduce map clutter.
Offering a container view for features aids in the review for valid structural attachment and containment relationships and helps determine if a dataset has an association role set. Container views often model a cluster of electrical devices on a pole top or inside a cabinet or vault.
Tap on a container feature to show all features inside the container. The container is shown as a polygon graphic with the content features contained within. The viewpoint and scale of the map are also changed to the container's extent. Connectivity and attachment associations inside the container are shown as red and blue dotted lines respectively.
- Load a web map that includes ArcGIS Pro Subtype Group Layers with only container features visible (i.e. fuse bank, switch bank, transformer bank, hand hole and junction box).
- Add a
GraphicsOverlay
for displaying a container view. - Create and load a
UtilityNetwork
with the same feature service URL as the layers in theMap
. - Add an event handler for the
GeoViewTapped
event of theMapView
. - Identify a feature and create a
UtilityElement
from it. - Get the associations for this element using
GetAssociationsAsync(UtilityElement, UtilityAssociationType.Containment)
. - Turn-off the visibility of all
OperationalLayers
. - Get the features for the
UtilityElement
(s) from the associations usingGetFeaturesForElementsAsync(IEnumerable<UtilityElement>)
- Add a
Graphic
with the same geometry and symbol as these features. - Add another
Graphic
that represents the combined extents of these features. - Get associations for this extent using
GetAssociationsAsync(Envelope)
- Add a
Graphic
to represent the association geometry between them using a symbol that distinguishes betweenAttachment
andConnectivity
association type. - Zoom to the combined extents of the features in the container.
- To exit the container view, clear the
Graphics
and zoom out to the previous extent.
- SubtypeFeatureLayer
- UtilityAssociation
- UtilityAssociationType
- UtilityElement
- UtilityNetwork
- UtilityNetworkDefinition
The Naperville electric feature service contains a utility network layer used to find associations shown in this sample. The Naperville electric containers webmap uses the same feature service endpoint and displays only container features. Authentication is required and handled within the sample code.
Using utility network on ArcGIS Enterprise 10.8 requires an ArcGIS Enterprise member account licensed with the Utility Network user type extension. Please refer to the utility network services documentation.
associations, connectivity association, containment association, structural attachment associations, utility network