Class defining high level properties that describes utility networks and trace networks.
- See also:
Property Overview
Name | Type | Summary | Class | |
---|---|---|---|---|
Object | more details The full network definition, accessible only when the network is loaded. | more details | Network | |
String | more details The physical dataset name of the network as defined in the backend database. | more details | Network | |
String | more details The name of the class. | more details | Accessor | |
String | more details Returns the root feature service url which this network is part of. | more details | Network | |
Extent | more details The full extent of the network, defined from the service territory used to create the network. | more details | Network | |
String | more details Random unique id (UUID) to identify a network as defined in the webmap spec. | more details | Network | |
Number | more details The layer id of the network. | more details | Network | |
String | more details The full url to the network layer id as defined in the webmap spec. | more details | Network | |
Boolean | more details Indicates whether the network instance has loaded. | more details | Network | |
Error | more details The Error object returned if an error occurred while loading. | more details | Network | |
String | more details Represents the status of a load operation. | more details | Network | |
Object[] | more details A list of warnings which occurred while loading. | more details | Network | |
String | more details Returns the url of network server. | more details | Network | |
String | more details The portal user owner of the network. | more details | Network | |
String | more details Converts url to a url object | more details | Network | |
Number | more details The schema version of the network. | more details | Network | |
Object | more details | more details | Network | |
SpatialReference | more details The spatial reference of the network, defined at the creation of the network, usually from the service territory class. | more details | Network | |
String | more details The name of the network as defined in the webmap spec. | more details | Network | |
String | more details The type of the dataset. | more details | Network |
Property Details
-
dataElement Object
-
The full network definition, accessible only when the network is loaded.
-
datasetName Stringreadonly
-
The physical dataset name of the network as defined in the backend database. Accessible only when the network is loaded.
-
The name of the class. The declared class name is formatted as
esri.folder.className
.
-
featureServiceUrl Stringreadonly
-
Returns the root feature service url which this network is part of.
Example:`https://utilitynetwork.esri.com/server/rest/services/NapervilleElectric/FeatureServer/`
-
fullExtent Extent
-
The full extent of the network, defined from the service territory used to create the network.
-
id String
-
Random unique id (UUID) to identify a network as defined in the webmap spec. Generated during sharing of the webmap.
-
layerId Numberreadonly
-
The layer id of the network.
-
layerUrl String
-
The full url to the network layer id as defined in the webmap spec. e.g.
https://utilitynetwork.esri.com/server/rest/services/NapervilleElectric/FeatureServer/17
(where 17 is the layer id of the network)
-
loaded Booleanreadonly
-
Indicates whether the network instance has loaded. When
true
, all the properties of the object can be accessed.- Default Value:false
-
loadError Errorreadonly
-
The Error object returned if an error occurred while loading.
- Default Value:null
-
loadStatus Stringreadonly
-
Represents the status of a load operation.
Value Description not-loaded The object's resources have not loaded. loading The object's resources are currently loading. loaded The object's resources have loaded without errors. failed The object's resources failed to load. See loadError for more details. Possible Values:"not-loaded"|"loading"|"failed"|"loaded"
- Default Value:not-loaded
-
A list of warnings which occurred while loading.
-
networkServiceUrl Stringreadonly
-
Returns the url of network server.
Example:`https://utilitynetwork.esri.com/server/rest/services/NapervilleElectric/UtilityNetworkServer/`
-
owner Stringreadonly
-
The portal user owner of the network. This portal user can perform administrive actions against the network.
-
parsedUrl Stringreadonly
-
Converts url to a url object
-
schemaGeneration Numberreadonly
-
The schema version of the network. Each version of the network introduces new features and capabilities. e.g. A utility network created with ArcGIS Pro 2.8 will have a schema generation version 5. While a UN created with ArcGIS Pro 2.6 will be version 4.
- See also:
-
sourceJSON Object
-
-
spatialReference SpatialReference
-
The spatial reference of the network, defined at the creation of the network, usually from the service territory class.
-
title String
-
The name of the network as defined in the webmap spec. Represents the layer name of the network layer defined while sharing the webmap.
-
type Stringreadonly
-
The type of the dataset. Returns "utility" if the object represents a utility network or "trace" in case the network is a trace network.
Possible Values:"utility"|"trace"
- Default Value:utility
Method Overview
Name | Return Type | Summary | Class | |
---|---|---|---|---|
more details Cancels a load() operation if it is already in progress. | more details | Network | ||
* | more details Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. | more details | Network | |
Number | more details The network consists of sources (classes) and each source has a unique Id. | more details | Network | |
Boolean | more details
| more details | Network | |
Boolean | more details
| more details | Network | |
Boolean | more details
| more details | Network | |
Promise | more details Triggers the loading of the network instance. | more details | Network | |
Promise | more details Loads the resources referenced by this class. | more details | Network | |
more details Adds one or more handles which are to be tied to the lifecycle of the object. | more details | Accessor | ||
Object | more details Converts an instance of this class to its ArcGIS portal JSON representation. | more details | Network | |
Promise | more details
| more details | Network |
Method Details
-
cancelLoad()
-
Cancels a load() operation if it is already in progress.
-
fromJSON(json){*}static
-
Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input
json
parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.Parameter:json ObjectA JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.
Returns:Type Description * Returns a new instance of this class.
-
getLayerIdBySourceId(id){Number}
-
The network consists of sources (classes) and each source has a unique Id. These source Ids are used to perform traversal in the network topology. The trace end points are not aware of layers and only returns sources of results. This method returns the layerId for given a source Id. Used as a helper method to process trace results.
Parameter:id NumberThe id of the source.
Returns:Type Description Number The layer id.
-
isFulfilled(){Boolean}
-
isFulfilled()
may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected). If it is fulfilled,true
will be returned.Returns:Type Description Boolean Indicates whether creating an instance of the class has been fulfilled (either resolved or rejected).
-
isRejected(){Boolean}
-
isRejected()
may be used to verify if creating an instance of the class is rejected. If it is rejected,true
will be returned.Returns:Type Description Boolean Indicates whether creating an instance of the class has been rejected.
-
isResolved(){Boolean}
-
isResolved()
may be used to verify if creating an instance of the class is resolved. If it is resolved,true
will be returned.Returns:Type Description Boolean Indicates whether creating an instance of the class has been resolved.
-
load(){Promise}
-
Triggers the loading of the network instance.
Fully loads the network definition and all related objects (e.g. trace configurations)
Returns:Type Description Promise Resolves when the Network is loaded.
-
load(signal){Promise}
-
Loads the resources referenced by this class. This method automatically executes for a View and all of the resources it references in Map if the view is constructed with a map instance.
This method must be called by the developer when accessing a resource that will not be loaded in a View.
The
load()
method only triggers the loading of the resource the first time it is called. The subsequent calls return the same promise.It's possible to provide a
signal
to stop being interested into aLoadable
instance load status. When the signal is aborted, the instance does not stop its loading process, only cancelLoad can abort it.Parameter:signal AbortSignaloptionalSignal object that can be used to abort the asynchronous task. The returned promise will be rejected with an Error named
AbortError
when an abort is signaled. See also AbortController for more information on how to construct a controller that can be used to deliver abort signals.Returns:Type Description Promise Resolves when the resources have loaded.
-
own(handleOrHandles)inheritedSince: ArcGIS API for JavaScript 4.24
-
Adds one or more handles which are to be tied to the lifecycle of the object. The handles will be removed when the object is destroyed.
// Manually manage handles const handle = reactiveUtils.whenOnce(() => !view.updating) .then(() => { wkidSelect.disabled = false; }); handle.remove(); // Assign a handle using own() this.own(reactiveUtils.whenOnce(() => !view.updating) .then(() => { wkidSelect.disabled = false; }));
Parameter:handleOrHandles WatchHandle|WatchHandle[]Handles marked for removal once the object is destroyed.
-
toJSON(){Object}
-
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.
Returns:Type Description Object The ArcGIS portal JSON representation of an instance of this class.
-
when(callback, errback){Promise}
-
when()
may be leveraged once an instance of the class is created. This method takes two input parameters: acallback
function and anerrback
function. Thecallback
executes when the instance of the class loads. Theerrback
executes if the instance of the class fails to load.Parameters:callback FunctionoptionalThe function to call when the promise resolves.
errback FunctionoptionalThe function to execute when the promise fails.
Returns:Type Description Promise Returns a new promise for the result of callback
that may be used to chain additional functions.Example:// Although this example uses MapView, any class instance that is a promise may use when() in the same way let view = new MapView(); view.when(function(){ // This function will execute once the promise is resolved }, function(error){ // This function will execute if the promise is rejected due to an error });