require(["esri/networks/support/TraceConfiguration"], (TraceConfiguration) => { /* code goes here */ });
import TraceConfiguration from "@arcgis/core/networks/support/TraceConfiguration.js";
esri/networks/support/TraceConfiguration
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 traceConfiguration property of the NamedTraceConfiguration.
- See also
Constructors
-
Parameterproperties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
Name | Type | Summary | Class |
---|---|---|---|
An array of objects representing network attribute or category conditions that serve as barriers. | TraceConfiguration | ||
An array of objects representing function barriers. | TraceConfiguration | ||
An array of objects representing function. | TraceConfiguration | ||
Do not stop the trace if the starting point is a barrier. | TraceConfiguration | ||
Specifies whether the traversability barrier features will be included in the trace results. | TraceConfiguration | ||
Specifies the type of features returned based on a network attribute or check for a category string. | TraceConfiguration | ||
Specifies the network attribute name used for determining the shortest path. | TraceConfiguration | ||
Determines whether traversability is applied to both junctions and edges, junctions only, or edges only. | TraceConfiguration | ||
Specifies whether an error will be returned if dirty areas are encountered in any of the traversed features. | TraceConfiguration |
Property Details
-
An array of objects representing network attribute or category conditions that serve as barriers.
-
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.
-
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
ignoreBarriersAtStartingPoints Boolean
-
Do not stop the trace if the starting point is a barrier.
-
includeBarriers
includeBarriers Boolean
-
Specifies whether the traversability barrier features will be included in the trace results.
-
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
shortestPathNetworkAttributeName String
-
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
traversabilityScope String
-
Determines whether traversability is applied to both junctions and edges, junctions only, or edges only. For example, if we set the
traversabilityScope
to bejunctions
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. Possible Values:"junctions" |"edges" |"junctionsAndEdges"
-
validateConsistency
validateConsistency Boolean
-
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.