Skip to content
import UtilityNetworkTraceAnalysis from "@arcgis/core/networks/UtilityNetworkTraceAnalysis.js";
Inheritance:
UtilityNetworkTraceAnalysisAccessor
Since
ArcGIS Maps SDK for JavaScript 5.0

Provides the logic for the UtilityNetworkTraceAnalysis component.

See also

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.

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor
Since
ArcGIS Maps SDK for JavaScript 4.7

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

executionError

readonly Property
Type
UtilityNetworkTraceAnalysisExecutionError | null | undefined

Displays execution errors.

loadError

readonly Property
Type
UtilityNetworkTraceAnalysisLoadError | null | undefined

Displays an error if loading fails.

state

readonly Property
Type
UtilityNetworkTraceAnalysisState

The current state of this object.

utilityNetwork

Property
Type
UtilityNetwork | null | undefined

Determines the utility network to use.

view

Property
Type
MapView | null | undefined

This property defines the target MapView.

Methods

MethodSignatureClass
executeNamedTraceConfiguration(parameters: NamedTraceConfigurationParameters): Promise<TraceResult>
executeTraceConfiguration(parameters: TraceConfigurationParameters): Promise<TraceResult>

executeNamedTraceConfiguration

Method
Signature
executeNamedTraceConfiguration (parameters: NamedTraceConfigurationParameters): Promise<TraceResult>

Method used to execute a trace using a named trace configuration.

Parameters
ParameterTypeDescriptionRequired
parameters

The parameters used to execute a trace based using named trace configurations.

Returns
Promise<TraceResult>

When resolved, returns the trace results which could include elements, function results or aggregated geometries.

Example
const traceLocations = [
{
type: "starting-point",
globalId: "{699C9FDB-3B39-46DC-90D2-13553F3C6694}",
percentAlong: 0.05,
},
{
type: "barrier",
globalId: "{8E99EB07-3BA0-4D7D-A1C0-4D69F5487470}",
percentAlong: 0.7
},
];
const traceResult = await utilityNetworkTraceAnalysis.executeNamedTraceConfiguration({
namedTraceConfigurationGlobalId: "{E43E4D2C-E191-4547-AFB8-392860694392}",
traceLocations: traceLocations
});

executeTraceConfiguration

Method
Signature
executeTraceConfiguration (parameters: TraceConfigurationParameters): Promise<TraceResult>

Executes a trace using custom trace parameters and returns trace results.

Parameters
ParameterTypeDescriptionRequired
parameters

The parameters used to execute a custom trace.

Returns
Promise<TraceResult>

When resolved, returns the trace results which could include elements, function results or aggregated geometries.

Example
const traceConfiguration = new UNTraceConfiguration({
domainNetworkName: "ElectricDistribution",
tierName: "Medium Voltage Radial",
subnetworkName: "RMT001",
conditionBarriers: [
{
name: "Operational Device Status",
type: "networkAttribute",
operator: "equal",
value: 1,
combineUsingOr: false,
isSpecificValue: true,
},
],
});
const traceResults = await utilityNetworkTraceAnalysis.executeTraceConfiguration({
traceConfiguration,
traceType: "subnetwork",
});

Type definitions

TraceConfigurationParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 4.34

Object used to execute a custom trace.

traceConfiguration

Property
Type
UNTraceConfiguration

The collection of trace configuration properties. Depending on the trace type, some of the trace configuration properties are required.

traceType

Property
Type
TraceType

The trace type. This specifies the core algorithm that will be run to analyze the network.

outSpatialReference

Property
Type
SpatialReference | undefined

The desired out SpatialReference of the trace.

traceLocations

Property
Type
TraceLocation[] | undefined

To perform the trace analytic, users can optionally supply a list of locations in forms of globalIds (UUID) and terminals. These locations indicate starting points and barriers. A starting point is set on network features to define the location in the network where a trace begins. Most traces require one or more starting points to be defined. Barriers are used in traces, export subnetwork operations, and update subnetwork operations to mark the locations to stop tracing. Use barriers to represent a location in the network beyond which the trace cannot travel.

resultTypes

Property
Type
ResultType[] | undefined

The types of results to return for the trace.

NamedTraceConfigurationParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 4.32

Object used to execute a trace using a named trace configuration.

namedTraceConfigurationGlobalId

Property
Type
string

The globalId of the named trace configuration.

outSpatialReference

Property
Type
SpatialReference | undefined

The desired out SpatialReference of the trace.

traceLocations

Property
Type
TraceLocation[] | undefined

To perform the trace analytic, users can optionally supply a list of locations in forms of globalIds (UUID) and terminals. These locations indicate starting points and barriers. A starting point is set on network features to define the location in the network where a trace begins. Most traces require one or more starting points to be defined. Barriers are used in traces, export subnetwork operations, and update subnetwork operations to mark the locations to stop tracing. Use barriers to represent a location in the network beyond which the trace cannot travel.

UtilityNetworkTraceAnalysisExecutionError

Type definition
Type
"trace-error"

UtilityNetworkTraceAnalysisLoadError

Type definition
Type
"no-user-type-extension" | "no-utility-network" | "no-view" | "sceneView-not-supported"

UtilityNetworkTraceAnalysisState

Type definition
Type
"disabled" | "executing" | "loading" | "ready"