You can display and share a complete utility networkA utility network is a feature service that represents a utility system, such as water, gas, or electricity. A utility network provides the capabilities to visualize, edit, and analyze utility assets and data. Learn more using a web mapA web map is a map stored as a JSON object that defines properties such as the basemap layer, data layers, layer styles, and pop-up styles. Its JSON structure is defined by the web map specification. Learn more or mobile geodatabaseA mobile geodatabase (.geodatabase) is a spatial data storage format in a single file on disk that can store, query, and manage spatial and nonspatial data. In applications built with the ArcGIS Maps SDKs for Native Apps, mobile geodatabases can be used in offline workflows when taking maps and features offline from services or in desktop-based scenarios as standalone mobile geodatabases from ArcGIS Pro. Learn more . You should include at most one feature layerA feature layer (client-side) is a data layer that can access and display features from a feature service that has the same type of geometry and attribute fields. Learn more for every feature tableA feature table is a database table of a single geometry type, such as point, line, or polygon, that stores features that conform to the schema of the table. Learn more in the utility network.

You can also create a map programmatically, making use of subtype feature layersA subtype feature layer is a feature layer that allows symbology and other layer properties to be set on a per-subtype basis. Learn more (known as subtype group layers in ArcGIS ProArcGIS Pro is a professional desktop GIS application that can explore, visualize, analyze, and manage 2D and 3D data. Learn more and in the web map). Subtype feature layers allow you to set symbology and other layerA layer is a reference to a collection of geographic data that is used to access and display data. The data for layers are typically provided by the basemap layer service and data services. Learn more properties on a per-subtype basis. Utility networks make extensive use of subtypes (referred to as asset groupsAn asset group is the main classification of a utility element. Each asset group is then divided into a collection of asset types. Learn more within a utility network). For example, a device feature table from an electric utility network would include subtypes for fuses, switches, transformers, and other kinds of equipment. For more information, see the Display subtype feature layer sample.

You can use display filters to show and hide featuresA feature is a single record, also known as a row, that represents a real-world entity. It typically contains a geometry (point, multipoint, polyline, or polygon) and attributes but it can also contain just attributes. Learn more inside containers, replicating the functionality available in ArcGIS Pro to show or hide containment association content. You can also use display filters to ensure that critical network features are returned in a traceA trace is an action that analyzes the paths in a utility network and returns features based on connectivity or traversability from the specified starting points. Learn more result even if they are removed from the view to simplify the display. For more information, see display filters in feature layers.

Access a utility network

Utility networks are implemented as network controller datasets. These datasets contain a network’s feature tablesA feature table is a database table of a single geometry type, such as point, line, or polygon, that stores features that conform to the schema of the table. Learn more along with the network’s domains, sources, tiersA tier is either 1) a level in the MVC programming pattern; 2) in a utility network, a tier is part of the architectural structure of a subnetwork that helps to define its properties and restrictions. Learn more , assets, terminalsA terminal represents logical ports, entries, or exit locations on a single device or junction object within a utility network. Each port can flow in or out. Each device can contain many terminals, all of which can be interconnected. Learn more , rules, and associationsAn association is a relationship between two elements that is reflected in a utility network topology. Learn more . A utility network is accessible from a feature serviceA feature service is a data service that provides access to spatial and non-spatial data in feature layers, feature layer views, and tables. Learn more geodatabase or a mobile geodatabaseA mobile geodatabase (.geodatabase) is a spatial data storage format in a single file on disk that can store, query, and manage spatial and nonspatial data. In applications built with the ArcGIS Maps SDKs for Native Apps, mobile geodatabases can be used in offline workflows when taking maps and features offline from services or in desktop-based scenarios as standalone mobile geodatabases from ArcGIS Pro. Learn more .

You can display and share a complete utility network with a user via a web mapA web map is a map stored as a JSON object that defines properties such as the basemap layer, data layers, layer styles, and pop-up styles. Its JSON structure is defined by the web map specification. Learn more if the map includes one feature layerA feature layer (client-side) is a data layer that can access and display features from a feature service that has the same type of geometry and attribute fields. Learn more for every network sourceA network source is a feature table whose features comprise one of a utility network's datasets. Learn more .

Diagram of objects loaded when loading a utility network with a map with layers for all network sources.

A UtilityNetwork object in Native Maps SDKs can be created from an online or an offlineOffline is the state of having no network connection and applications cannot access ArcGIS Online or ArcGIS Enterprise. Learn more source.

These sources provide access to the topological network in the utility network. For example, you can provide a map that contains a subset of the feature layersA feature layer (client-side) is a data layer that can access and display features from a feature service that has the same type of geometry and attribute fields. Learn more for a specific workflow; any tracing is performed using the full topological network provided by the feature serviceA feature service is a data service that provides access to spatial and non-spatial data in feature layers, feature layer views, and tables. Learn more . To add additional utility network layers, you can create them from the individual network sourcesA network source is a feature table whose features comprise one of a utility network's datasets. Learn more as required. You can also access a utility network and run a traceA trace is an action that analyzes the paths in a utility network and returns features based on connectivity or traversability from the specified starting points. Learn more completely without a map, just provide the feature serviceA feature service is a data service that provides access to spatial and non-spatial data in feature layers, feature layer views, and tables. Learn more URL when you create the utility network or load a utility network from a mobile geodatabaseA mobile geodatabase (.geodatabase) is a spatial data storage format in a single file on disk that can store, query, and manage spatial and nonspatial data. In applications built with the ArcGIS Maps SDKs for Native Apps, mobile geodatabases can be used in offline workflows when taking maps and features offline from services or in desktop-based scenarios as standalone mobile geodatabases from ArcGIS Pro. Learn more .

Utility Network version 2 and later is supported. This is provided from ArcGIS ProArcGIS Pro is a professional desktop GIS application that can explore, visualize, analyze, and manage 2D and 3D data. Learn more 2.2 and later. For details see utility network upgrade history.

Access a utility network from an online source

Online sources include a URL to a feature serviceA feature service is a data service that provides access to spatial and non-spatial data in feature layers, feature layer views, and tables. Learn more or a feature service portal itemAn item, also known as a content item, is a resource stored in a portal such as a web map, hosted layer, style, script tool, file, or notebook. Learn more . Maps from a web mapA web map is a map stored as a JSON object that defines properties such as the basemap layer, data layers, layer styles, and pop-up styles. Its JSON structure is defined by the web map specification. Learn more portal itemAn item, also known as a content item, is a resource stored in a portal such as a web map, hosted layer, style, script tool, file, or notebook. Learn more authored in ArcGIS ProArcGIS Pro is a professional desktop GIS application that can explore, visualize, analyze, and manage 2D and 3D data. Learn more version 2.6 or higher may also include utility networks.

When using either a URL to a feature service or a portal itemAn item, also known as a content item, is a resource stored in a portal such as a web map, hosted layer, style, script tool, file, or notebook. Learn more as source, create and load a service geodatabase with tablesA table is a non-spatial dataset in a feature service. All records in a table share the same set of fields. Learn more that are used to create the layers on the map. Then create a utility network with the same source and map.

Branch-versioning

When a utility network is based on a ServiceGeodatabase that points to an ArcGIS EnterpriseArcGIS Enterprise is a GIS mapping, analytics, data hosting, and content management product that can be hosted on-premise or in a cloud infrastructure. It includes software, applications, tools, APIs, and services for users and developers. Learn more Feature ServiceA feature service is a data service that provides access to spatial and non-spatial data in feature layers, feature layer views, and tables. Learn more (version 10.6 or higher) with branch versioning enabled, you can view, edit, and perform a trace on specific versions. Read more about Branch versioning in the ArcGIS Pro documentation and see the Use branch versioned data topic in this guide for more information.

A service geodatabaseA geodatabase is a spatial data storage format that can contain multiple datasets of geographic features and non-spatial tabular data, as well as attachments, field domain definitions, and relationships between layers/tables. Learn more can be created in a persistent or transient session. Using a web map or creating a service geodatabaseA geodatabase is a spatial data storage format that can contain multiple datasets of geographic features and non-spatial tabular data, as well as attachments, field domain definitions, and relationships between layers/tables. Learn more without a session type by default creates a service geodatabase in a transient session. A service geodatabase in a persistent session acquires a shared lock from the server during load which may be upgraded to an exclusive lock during an edit to allow multiple simultaneous viewers or a single editor. A service geodatabase in a transient session will not hold a lock to allow concurrent viewers and editors.

Access a utility network from an offline source

OfflineOffline is the state of having no network connection and applications cannot access ArcGIS Online or ArcGIS Enterprise. Learn more sources include path to a mobile geodatabaseA mobile geodatabase (.geodatabase) is a spatial data storage format in a single file on disk that can store, query, and manage spatial and nonspatial data. In applications built with the ArcGIS Maps SDKs for Native Apps, mobile geodatabases can be used in offline workflows when taking maps and features offline from services or in desktop-based scenarios as standalone mobile geodatabases from ArcGIS Pro. Learn more file with a *.geodatabase extension or a web map containing a UtilityNetwork that has been taken offline.

A mobile geodatabase source can be one of the following:

  • a stand-alone mobile geodatabaseA mobile geodatabase (.geodatabase) is a spatial data storage format in a single file on disk that can store, query, and manage spatial and nonspatial data. In applications built with the ArcGIS Maps SDKs for Native Apps, mobile geodatabases can be used in offline workflows when taking maps and features offline from services or in desktop-based scenarios as standalone mobile geodatabases from ArcGIS Pro. Learn more that is exported from ArcGIS ProArcGIS Pro is a professional desktop GIS application that can explore, visualize, analyze, and manage 2D and 3D data. Learn more 2.7 or higher

  • a sync-enabled mobile geodatabase that is generated from ArcGIS EnterpriseArcGIS Enterprise is a GIS mapping, analytics, data hosting, and content management product that can be hosted on-premise or in a cloud infrastructure. It includes software, applications, tools, APIs, and services for users and developers. Learn more Feature Service 10.9 or higher using a GeodatabaseSyncTask or OfflineMapSyncTask.

When using a mobile geodatabase, create and load a geodatabaseA geodatabase is a spatial data storage format that can contain multiple datasets of geographic features and non-spatial tabular data, as well as attachments, field domain definitions, and relationships between layers/tables. Learn more whose tablesA table is a non-spatial dataset in a feature service. All records in a table share the same set of fields. Learn more are used to create the layersA layer is a reference to a collection of geographic data that is used to access and display data. The data for layers are typically provided by the basemap layer service and data services. Learn more and utility networks on the map.

Load the utility network

The utility network follows the loadableLoadable is a characteristic of a resource, such as a layer, map, or portal item, that allows developers to perform asynchronous operations while the resource loads. Learn more pattern described in Loading resources asynchronously.

Loading the utility network loads the entire utility network schema (information about the datasets that participate in the network). Once loaded, your app can navigate this network schema to discover the domain networksA domain network is the primary classification of a utility network, representing the utility system type, such as electricity, gas, or water. Learn more it contains and any further details about the network. The utility network’s definition includes the capabilities supported by the utility network object, such as whether tracing and/or querying associationsAn association is a relationship between two elements that is reflected in a utility network topology. Learn more are supported.

// Load the utility network.
utilityNetwork.loadAsync();
// Wait for the utility network to finish loading.
utilityNetwork.addDoneLoadingListener(() -> {
// Verify the utility network loaded.
if (utilityNetwork.getLoadStatus() == LoadStatus.LOADED) {
System.out.println("The Utility Network schema version is "
+ utilityNetwork.getDefinition().getSchemaVersion());
} else {
new Alert(Alert.AlertType.ERROR, "Error loading Utility Network.").show();
}
});