UtilityNetworkTraceAnalysisViewModel

AMD: require(["esri/widgets/UtilityNetworkTraceAnalysis/UtilityNetworkTraceAnalysisViewModel"], (UtilityNetworkTraceAnalysisViewModel) => { /* code goes here */ });
ESM: import UtilityNetworkTraceAnalysisViewModel from "@arcgis/core/widgets/UtilityNetworkTraceAnalysis/UtilityNetworkTraceAnalysisViewModel.js";
Class: esri/widgets/UtilityNetworkTraceAnalysis/UtilityNetworkTraceAnalysisViewModel
Since: ArcGIS Maps SDK for JavaScript 4.32

Provides the logic for the UtilityNetworkTraceAnalysis component.

See also

Constructors

UtilityNetworkTraceAnalysisViewModel

Constructor
new UtilityNetworkTraceAnalysisViewModel(properties)
Parameter
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Name Type Summary Class

Displays execution errors.

UtilityNetworkTraceAnalysisViewModel

Displays an error if loading fails.

UtilityNetworkTraceAnalysisViewModel

The viewModel's state.

UtilityNetworkTraceAnalysisViewModel

Determines the utility network to use.

UtilityNetworkTraceAnalysisViewModel

The view from which the widget will operate.

UtilityNetworkTraceAnalysisViewModel

Property Details

executionError

Property
executionError String |null |undefinedreadonly

Displays execution errors.

For UtilityNetworkTraceAnalysisViewModel the executionError is always "trace-error".

loadError

Property
loadError String |null |undefinedreadonly

Displays an error if loading fails.

Possible Values:"no-utility-network" |"no-view" |"sceneView-not-supported"

state

Property
state Stringreadonly

The viewModel's state.

Possible Values:"disabled" |"executing" |"failed" |"loading" |"ready"

utilityNetwork

Property
utilityNetwork UtilityNetwork |null |undefined

Determines the utility network to use.

view

Property
view MapView |null |undefined

The view from which the widget will operate.

Method Overview

Name Return Type Summary Class
Promise<TraceResult>

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

UtilityNetworkTraceAnalysisViewModel

Method Details

executeNamedTraceConfiguration

Method
executeNamedTraceConfiguration(parameters){Promise<TraceResult>}

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

Parameter

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

Returns
Type Description
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.048388288199580576,
 },
 {
     type: "barrier",
     globalId: "{8E99EB07-3BA0-4D7D-A1C0-4D69F5487470}",
     percentAlong: 0.57765268897410094
 },
];
const traceResult = await traceAnalysisViewModel.executeNamedTraceConfiguration({
    namedTraceConfigurationGlobalId: "{E43E4D2C-E191-4547-AFB8-392860694392}",
    traceLocations: traceLocations
});

Type Definitions

NamedTraceConfigurationParameters

Type Definition
NamedTraceConfigurationParameters Object

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

Properties
namedTraceConfigurationGlobalId String

The globalId of the named trace configuration.

outSpatialReference SpatialReference
optional

The desired out SpatialReference of the trace.

traceLocations TraceLocation[]
optional

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.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close