import NetworkSystemLayers from "@arcgis/core/networks/support/NetworkSystemLayers.js";const NetworkSystemLayers = await $arcgis.import("@arcgis/core/networks/support/NetworkSystemLayers.js");- Inheritance:
- NetworkSystemLayers→
Accessor
- 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 instanceesriConfig.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
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
associationsTable readonly | | |
associationsTableId readonly | | |
associationsTableUrl readonly | | |
declaredClass readonly inherited | ||
dirtyAreasLayerId readonly | | |
dirtyAreasLayerUrl readonly | | |
rulesTableId readonly | | |
rulesTableUrl readonly | | |
subnetworksTable readonly | | |
subnetworksTableId readonly | | |
subnetworksTableUrl readonly | |
associationsTable
- 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.
dirtyAreasLayerId
The layer ID of the service containing the utility network's dirty areas.
dirtyAreasLayerUrl
The service url containing the utility network's dirty areas.
subnetworksTable
- 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
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
The service url containing the utility network's Subnetworks table.
Methods
| Method | Signature | Class |
|---|---|---|
loadAssociationsTable(options?: AbortOptions | null | undefined): Promise<FeatureLayer> | | |
loadSubnetworksTable(options?: AbortOptions | null | undefined): Promise<FeatureLayer> | |
loadAssociationsTable
- 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
| Parameter | Type | Description | Required |
|---|---|---|---|
| options | An object containing an optional | |
- Returns
- Promise<FeatureLayer>
Resolves to a loaded instance of FeatureLayer representing the associations table.
loadSubnetworksTable
- 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
| Parameter | Type | Description | Required |
|---|---|---|---|
| options | An object containing an optional | |
- Returns
- Promise<FeatureLayer>
Resolves to a loaded instance of FeatureLayer representing the subnetworks table.