ESM
import "@arcgis/map-components/components/arcgis-utility-network-validate-network-topology";
Inheritance
ArcgisUtilityNetworkValidateNetworkTopologyHTMLElement
Since
ArcGIS Maps SDK for JavaScript 5.1

Overview

The Utility Network Validate Network Topology component validates dirty areas in a utility network after edits have been made. It provides an interface to choose a utility network (if applicable), choose the extent to validate, and perform validation. If successful, the result of the validation is available as result.

Validation requirements

  • The component only supports a 2D MapView.
  • The utility network must be stored in the map and the network topology must be enabled.
  • The active portal user must have the required user type extension to validate a network topology.
  • Validation fails in cases such as: no dirty areas in the target extent, inability to acquire a version lock, or insufficient permissions on the version.

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

Examples

This component can be used slotted into an arcgis-map:

<arcgis-map item-id="471eb0bf37074b1fbb972b1da70fb310">
<arcgis-utility-network-validate-network-topology slot="top-right"></arcgis-utility-network-validate-network-topology>
</arcgis-map>

Alternatively, this component can be used outside of a map by providing a referenceElement:

<calcite-shell>
<calcite-shell-panel slot="panel-start" position="start" width-scale="l">
<arcgis-utility-network-validate-network-topology reference-element="#map-element"></arcgis-utility-network-validate-network-topology>
</calcite-shell-panel>
<arcgis-map id="map-element" item-id="471eb0bf37074b1fbb972b1da70fb310"></arcgis-map>
</calcite-shell>

See also

Properties

disabled

Property
Type
boolean

When true, the component is visually withdrawn and cannot receive user interaction.

Attribute
disabled
Default value
false

extentToValidate

Property
Type
ExtentOption

Specifies the area to validate.

Use "current" to validate the current view extent. Use "entire" to validate the utility network's full extent.

Attribute
extent-to-validate
Default value
"current"

hideUtilityNetworkSelect

Property
Type
boolean

When true, hides the utility network selector.

The selector is also hidden when the map has one utility network.

Attribute
hide-utility-network-select
Default value
false

label

Property
Type
string | undefined

The component's default label.

Attribute
label

messageOverrides

Property
Type
Record<string, unknown> | undefined

Replace localized message strings with your own strings.

Note: Individual message keys may change between releases.

referenceElement

Property
Type
ArcgisReferenceElement | string | undefined

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

result

Property
Type
ValidateNetworkTopologyResult | undefined

The result returned from the most recent successful utility network topology validation. This value is cleared when clicking the "Validate" action.

state

readonly Property
Type
State

The current component state.

utilityNetwork

Property
Type
UtilityNetwork | undefined

The utility network to validate.

If not provided, the component uses the first utility network stored in the map. When the map contains multiple utility networks and the selector is visible, the user can change this value from the component UI.

view

Property
Type
MapView | undefined

The target MapView.

The component only supports 2D map views.

Methods

MethodSignature
inherited
componentOnReady(): Promise<this>

componentOnReady

inherited Method
Signature
componentOnReady (): Promise<this>
Inherited from: this

Creates a promise that resolves once the component is fully loaded.

Returns
Promise<this>
Example
const arcgisUtilityNetworkValidateNetworkTopology = document.createElement("arcgis-utility-network-validate-network-topology");
document.body.append(arcgisUtilityNetworkValidateNetworkTopology);
await arcgisUtilityNetworkValidateNetworkTopology.componentOnReady();
console.log("arcgis-utility-network-validate-network-topology is ready to go!");

Events

arcgisReady

Event
arcgisReady: CustomEvent<void>

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

bubbles composed cancelable

arcgisValidateNetworkTopologyEnd

Event
arcgisValidateNetworkTopologyEnd: CustomEvent<void>

Fires after a validation workflow ends.

This event fires after validation succeeds, fails, or is canceled by preventing the @arcgisValidateNetworkTopologyStart event.

bubbles composed cancelable

arcgisValidateNetworkTopologyStart

Event
arcgisValidateNetworkTopologyStart: CustomEvent<void>

Fires before the validation request is sent.

This event can be prevented with event.preventDefault() to cancel validation.

bubbles composed cancelable
Example
const validateNetworkTopologyElement = document.querySelector("arcgis-utility-network-validate-network-topology");
validateNetworkTopologyElement.addEventListener("arcgisValidateNetworkTopologyStart", (event) => {
event.preventDefault();
});

Type definitions

Disabled

Type definition

Component state when validation is unavailable because the component cannot run.

type

Property
Type
"disabled"

Executing

Type definition

Component state while utility network topology validation is currently running.

type

Property
Type
"executing"

Loading

Type definition

Component state while component dependencies are loading.

type

Property
Type
"loading"

Ready

Type definition

Component state when component dependencies are loaded and validation can execute.

type

Property
Type
"ready"

Success

Type definition

Component state after validation completes successfully.

type

Property
Type
"success"

message

Property
Type
string

ValidateNetworkTopologyError

Type definition

Component state when validation or setup encounters an error.

type

Property
Type
"error-disable-component" | "error-disable-execute" | "error-info"

The type of error the component has encountered:

  • error-disable-component: The component is disabled because the component could not find a utility network in the map.
  • error-disable-execute: The component cannot run validation because the user lacks permissions or the dirty areas layer is missing from the map.
  • error-info: Some other error occurred while running validation. The error is displayed in the component.

message

Property
Type
string

Additional information about the error the component has encountered.

ExtentOption

Type definition

The extent options for network topology validation.

Type
"current" | "entire"

State

Type definition

The current component workflow state.