Skip to content
import NetworkSystemLayers from "@arcgis/core/networks/support/NetworkSystemLayers.js";
Inheritance:
NetworkSystemLayersAccessor
Since
ArcGIS Maps SDK for JavaScript 4.25

The NetworkSystemLayers contains the url and IDs of the utility network rules, subnetworks, and dirty areas tables or layers.

See also
Example
const [WebMap, MapView, esriConfig] = await $arcgis.import([
"@arcgis/core/WebMap.js",
"@arcgis/core/views/MapView.js",
"@arcgis/core/config.js"
]);
let utilityNetwork;
// set the hostname to the portal instance
esriConfig.portalUrl = "https://myHostName.domain.com/arcgis";
const webMap = new WebMap({
portalItem: {
id: "webmapID"
}
});
const mapView = new MapView({
map: webMap
});
webMap.when(async () => {
// check if webMap contains utility networks
if (webMap.utilityNetworks.length > 0) {
// assign the utility network at index 0
utilityNetwork = webMap.utilityNetworks.at(0);
// trigger the loading of the UtilityNetwork instance
await utilityNetwork.load();
// Print the subnetworks table service url and id
console.log(`Dirty areas layer id: ${utilityNetwork.networkSystemLayers.subnetworksTableId}`);
console.log(`Dirty areas layer url: ${utilityNetwork.networkSystemLayers.subnetworksTableUrl}`);
}
});

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.

associationsTable

readonly Property
Type
FeatureLayer | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.32

A FeatureLayer representing the associations table. This layer is only loaded as needed, so the property has a default value of null. It can be set by calling the loadAssociationsTable() method.

associationsTableId

readonly Property
Type
number | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.29

associationsTableUrl

readonly Property
Type
string | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.29

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

dirtyAreasLayerId

readonly Property
Type
number | null | undefined

The layer ID of the service containing the utility network's dirty areas.

dirtyAreasLayerUrl

readonly Property
Type
string | null | undefined

The service url containing the utility network's dirty areas.

rulesTableId

readonly Property
Type
number | null | undefined

The layer ID of the service containing the network rules table.

rulesTableUrl

readonly Property
Type
string | null | undefined

The service url containing the network rules table.

subnetworksTable

readonly Property
Type
FeatureLayer | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.34

A FeatureLayer representing the subnetworks table. This layer is only loaded as needed, so the property has a default value of null. It can be set by calling the loadSubnetworksTable() method.

subnetworksTableId

readonly Property
Type
number | null | undefined

The layer ID of the service containing the utility network's Subnetworks table. The Subnetworks table contains the information about all the existing and deleted subnetworks in a utility network.

subnetworksTableUrl

readonly Property
Type
string | null | undefined

The service url containing the utility network's Subnetworks table.

Methods

MethodSignatureClass
loadAssociationsTable(options?: AbortOptions | null | undefined): Promise<FeatureLayer>
loadSubnetworksTable(options?: AbortOptions | null | undefined): Promise<FeatureLayer>

loadAssociationsTable

Method
Signature
loadAssociationsTable (options?: AbortOptions | null | undefined): Promise<FeatureLayer>
Since
ArcGIS Maps SDK for JavaScript 4.32

Loads the layer identified by the associationsTableUrl property.

Parameters
ParameterTypeDescriptionRequired
options

An object containing an optional signal property that can be used to cancel the request.

Returns
Promise<FeatureLayer>

Resolves to a loaded instance of FeatureLayer representing the associations table.

loadSubnetworksTable

Method
Signature
loadSubnetworksTable (options?: AbortOptions | null | undefined): Promise<FeatureLayer>
Since
ArcGIS Maps SDK for JavaScript 4.34

Loads the layer identified by the subnetworksTableUrl property.

Parameters
ParameterTypeDescriptionRequired
options

An object containing an optional signal property that can be used to cancel the request.

Returns
Promise<FeatureLayer>

Resolves to a loaded instance of FeatureLayer representing the subnetworks table.