import TraceConfiguration from "@arcgis/core/networks/support/TraceConfiguration.js";const TraceConfiguration = await $arcgis.import("@arcgis/core/networks/support/TraceConfiguration.js");- Inheritance:
- TraceConfiguration→
Accessor
- Subclasses:
- UNTraceConfiguration
- Since
- ArcGIS Maps SDK for JavaScript 4.21
The TraceConfiguration class provides the ability to configure custom trace properties required to run a network trace. These properties control trace settings for traversability, functions, filters, and outputs. The Configure a trace and Add Trace Configuration (Utility Network) documentation is helpful to learn more about trace configuration parameters.
The Trace Configuration differs from the NamedTraceConfiguration. A NamedTraceConfiguration allows for configuring and storing properties on complex traces in a utility network. These configurations are created and stored within the utility network, and can be reused and shared across an organization. The named trace configurations can be referenced by a globalID.
The benefit of using a TraceConfiguration is the ability to configure custom trace properties without having to create and share a new named trace configuration within the utility network. This improves user experience because it does not require users to understand all the details that go into creating an entire named trace configuration. Users can just modify certain trace properties and then execute their own custom trace. In order to achieve this, users can fetch the NamedTraceConfigurations available in the utility network and override it. To override an existing named trace configuration, create a TraceConfiguration instance and assign it to the NamedTraceConfiguration.traceConfiguration property of the NamedTraceConfiguration.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
| | ||
declaredClass readonly inherited | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| |
conditionBarriers
- Type
- BarrierJSON[]
An array of objects representing network attribute or category conditions that serve as barriers.
functionBarriers
- Type
- FunctionBarrierJSON[]
An array of objects representing function barriers. Function barriers define when a trace should stop when an aggregated function condition is satisfied. For example, stop the trace when the sum of the shape length network attribute exceeds 100 meters.
functions
- Type
- FunctionJSON[]
An array of objects representing function. A function allows the ability to run calculations on network attributes associated with traced network features. Multiple functions can be specified for a single trace.
outputConditions
- Type
- OutputConditionJSON[]
Specifies the type of features returned based on a network attribute or check for a category string. A condition barrier uses a network attribute, an operator, a type, and an attribute value.
- See also
traversabilityScope
Determines whether traversability is applied to both junctions and edges, junctions only, or edges only. For example, if we set the traversabilityScope to be junctions only, edges will not get evaluated
against traversability conditions and filters.
| Value | Description |
|---|---|
| junctions | Traversability will be applied to junctions only. |
| edges | Traversability will be applied to edges only. |
| junctionsAndEdges | Traversability will be applied to both junctions and edges. |
Methods
fromJSON
- Signature
-
fromJSON (json: any): any
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.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| json | A 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
- any
Returns a new instance of this class.
toJSON
- Signature
-
toJSON (): any
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.
- Returns
- any
The ArcGIS portal JSON representation of an instance of this class.