Utility Network Trace

ESM:
Use dark colors for code blocksCopy
1
import "@arcgis/map-components/components/arcgis-utility-network-trace";
CDN:
No specific import is needed for this component.

Utility Network Trace component provides a way to run traces in a Utility Network based on connectivity or traversability from set input flags. Input flags (starting points and barriers) can be set by clicking the view.

The Utility Network Trace component does not support proxied feature services or feature services that utilize stored credentials.

Note: Sign in to access the data in this sample, U/P: viewer01/I68VGU^nMurF

Demo

Properties

PropertyAttributeType
auto-destroy-disabled
boolean
disabled
boolean
enable-result-area
boolean
gdbVersion
deprecated
gdb-version
string
icon
string
label
string
position
"bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing"
reference-element
Array<string>
select-on-complete-disabled
boolean
show-graphics-on-complete-disabled
boolean
show-selection-attributes-disabled
boolean
state
readonly
state
"loading" | "ready"

autoDestroyDisabled

Property
autoDestroyDisabled: boolean

If true, the component will not be destroyed automatically when it is disconnected from the document. This is useful when you want to move the component to a different place on the page, or temporarily hide it. If this is set, make sure to call the destroy method when you are done to prevent memory leaks.

Attribute
auto-destroy-disabled
Default value
false

defaultGraphicColor

Property
defaultGraphicColor: GraphicColor

The default color to assign the aggregated geometry of a trace result.

Default value
{ color: [255, 255, 0, 0.6], haloOpacity: 0.9, fillOpacity: 0.2, hex: "#FFFF00" }

disabled

reflected

Attribute changes are reflected on the DOM.

Property
disabled: boolean

When true, the widget is visually withdrawn and cannot be interacted with.

Attribute
disabled
Default value
true

enableResultArea

Property
enableResultArea: boolean

When true, provides the ability to show the convex hull or buffer.

Attribute
enable-result-area
Default value
false

flags

Property
flags: Array<FlagProperty>

An array of map points to load into the widget to lookup flags.

Default value
[]

gdbVersion

deprecatedProperty
gdbVersion: string
DeprecatedgdbVersion is deprecated since version 4.31.

The Geodatabase version to pass into the trace.

Attribute
gdb-version
Default value
"sde.DEFAULT"

icon

Property
icon: string

Icon which represents the component. Typically used when the component is controlled by another component (e.g. by the Expand component).

See also
Attribute
icon
Default value
"utility-network-trace"

inputSettings

Property
inputSettings: Array<InputSetting>

Custom labels, descriptions, and symbol for the input flags.

Default value
[]

label

Property
label: string

The widget's default label.

Read more...

Attribute
label

position

Property
position: "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing"
Attribute
position
Default value
"top-right"

referenceElement

Property

By assigning the id attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.

See also
Attribute
reference-element

resultAreaProperties

Property
resultAreaProperties: ResultAreaPropertiesExtend

The properties to determine the size and color of the result area convex hull or buffer, and determines if it displays on the map when the trace completes.

Default value
{ type: "convexhull", distance: 10, unit: "meters", areaUnit: "square-meters", color: { color: [255, 165, 0, 0.5], haloOpacity: 0.9, fillOpacity: 0.2, hex: "#ffa500" }, show: false }

selectedTraces

Property
selectedTraces: Array<string>

A list of global Ids of traces to select on load.

Default value
[]

selectOnCompleteDisabled

Property
selectOnCompleteDisabled: boolean

When true, the utility network elements are selected in the view when traces are completed.

Read more...

Attribute
select-on-complete-disabled
Default value
true

showGraphicsOnCompleteDisabled

Property
showGraphicsOnCompleteDisabled: boolean

When true, a graphic layer is added to the view to highlight the utility network elements when traces are completed.

Read more...

Attribute
show-graphics-on-complete-disabled
Default value
true

showSelectionAttributesDisabled

Property
showSelectionAttributesDisabled: boolean

Determines whether to show list of selection attributes.

Read more...

Attribute
show-selection-attributes-disabled
Default value
true

state

readonlyreflected

Attribute changes are reflected on the DOM.

Property
state: "loading" | "ready"

The current state of the component.

Attribute
state
Default value
"ready"

Slots

No slots to display.

Events

EventType
UtilityNetworkTraceAddFlagEvent
UtilityNetworkTraceAddFlagCompleteEvent
UtilityNetworkTraceAddFlagErrorEvent
UtilityNetworkTraceAddResultAreaEvent
CustomEvent<{ name: "state"; }>
UtilityNetworkTraceRemoveResultAreaEvent

arcgisAddFlag

Event
arcgisAddFlag: UtilityNetworkTraceAddFlagEvent
bubbles

Events triggered on this element will be propagated to their outermost elements.

composed

The event is composable and will propagate across the shadow DOM into the standard DOM.

cancelable

The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.

arcgisAddFlagComplete

Event
arcgisAddFlagComplete: UtilityNetworkTraceAddFlagCompleteEvent
bubbles

Events triggered on this element will be propagated to their outermost elements.

composed

The event is composable and will propagate across the shadow DOM into the standard DOM.

cancelable

The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.

arcgisAddFlagError

Event
arcgisAddFlagError: UtilityNetworkTraceAddFlagErrorEvent
bubbles

Events triggered on this element will be propagated to their outermost elements.

composed

The event is composable and will propagate across the shadow DOM into the standard DOM.

cancelable

The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.

arcgisAddResultArea

Event
arcgisAddResultArea: UtilityNetworkTraceAddResultAreaEvent
bubbles

Events triggered on this element will be propagated to their outermost elements.

composed

The event is composable and will propagate across the shadow DOM into the standard DOM.

cancelable

The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.

arcgisPropertyChange

Event
arcgisPropertyChange: CustomEvent<{ name: "state"; }>

Emitted when the value of a property is changed. Use this to listen to changes to properties.

bubbles

Events triggered on this element will be propagated to their outermost elements.

composed

The event is composable and will propagate across the shadow DOM into the standard DOM.

cancelable

The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.

arcgisReady

Event
arcgisReady: CustomEvent<void>

Emitted when the component associated with a map or scene view is is ready to be interacted with.

bubbles

Events triggered on this element will be propagated to their outermost elements.

composed

The event is composable and will propagate across the shadow DOM into the standard DOM.

cancelable

The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.

arcgisRemoveResultArea

Event
arcgisRemoveResultArea: UtilityNetworkTraceRemoveResultAreaEvent
bubbles

Events triggered on this element will be propagated to their outermost elements.

composed

The event is composable and will propagate across the shadow DOM into the standard DOM.

cancelable

The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.

Methods

MethodSignature
checkCanTrace(): Promise<void>
componentOnReady(): Promise<void>
confirmReset(): Promise<void>
destroy(): Promise<void>

checkCanTrace

Method
checkCanTrace(): Promise<void>
Returns
Promise<void>

componentOnReady

Method
componentOnReady(): Promise<void>

Create a promise that resolves once component is fully loaded.

Example
Use dark colors for code blocksCopy
1
2
3
4
const arcgisUtilityNetworkTrace = document.querySelector("arcgis-utility-network-trace");
document.body.append(arcgisUtilityNetworkTrace);
await arcgisUtilityNetworkTrace.componentOnReady();
console.log("arcgis-utility-network-trace is ready to go!");
Returns
Promise<void>

confirmReset

Method
confirmReset(): Promise<void>
Returns
Promise<void>

destroy

Method
destroy(): Promise<void>

Permanently destroy the component.

Returns
Promise<void>

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