Skip to content
import TraceConfiguration from "@arcgis/core/networks/support/TraceConfiguration.js";
Inheritance:
TraceConfigurationAccessor
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.

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.

conditionBarriers

Property
Type
BarrierJSON[]

An array of objects representing network attribute or category conditions that serve as barriers.

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

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

functionBarriers

Property
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

Property
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.

ignoreBarriersAtStartingPoints

Property
Type
boolean | null | undefined

Do not stop the trace if the starting point is a barrier.

includeBarriers

Property
Type
boolean | null | undefined

Specifies whether the traversability barrier features will be included in the trace results.

outputConditions

Property
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

shortestPathNetworkAttributeName

Property
Type
string | null | undefined

Specifies the network attribute name used for determining the shortest path. The shortest path is calculated using a numeric network attribute such as shape length.

traversabilityScope

Property
Type
"junctions" | "edges" | "junctionsAndEdges" | null | undefined

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.

ValueDescription
junctionsTraversability will be applied to junctions only.
edgesTraversability will be applied to edges only.
junctionsAndEdgesTraversability will be applied to both junctions and edges.

validateConsistency

Property
Type
boolean | null | undefined

Specifies whether an error will be returned if dirty areas are encountered in any of the traversed features. If set to false the trace will succeed even when dirty areas were encountered. However, the trace results might not be consistent.

Methods

MethodSignatureClass
fromJSON
inherited static
fromJSON(json: any): any
toJSON
inherited
toJSON(): any

fromJSON

inheritedstatic Method
Signature
fromJSON (json: any): any
Inherited from: JSONSupportMixin

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
ParameterTypeDescriptionRequired
json
any

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

inherited Method
Signature
toJSON (): any
Inherited from: JSONSupportMixin

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.