import "@arcgis/map-components/components/arcgis-utility-network-validate-network-topology";- Inheritance
- ArcgisUtilityNetworkValidateNetworkTopology→
HTMLElement
- 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>Properties
| Property | Attribute | Type |
|---|---|---|
| disabled | ||
| extent-to-validate | ||
| hide-utility-network-select | ||
| label | ||
| | ||
| reference-element | ||
| | ||
| readonly | | |
| | ||
| |
disabled
- Type
- boolean
When true, the component is visually withdrawn and cannot receive user interaction.
- Attribute
- disabled
- Default value
- false
extentToValidate
- 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
- 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
referenceElement
- 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.
- Attribute
- reference-element
utilityNetwork
- 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.
Methods
| Method | Signature |
|---|---|
| inherited | componentOnReady(): Promise<this> |
componentOnReady
- Signature
-
componentOnReady (): Promise<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
arcgisReady: CustomEvent<void> Emitted when the component associated with a map or scene view is ready to be interacted with.
arcgisValidateNetworkTopologyEnd
arcgisValidateNetworkTopologyEnd: CustomEvent<void> Fires after a validation workflow ends.
This event fires after validation succeeds, fails, or is canceled by preventing the @arcgisValidateNetworkTopologyStart event.
arcgisValidateNetworkTopologyStart
arcgisValidateNetworkTopologyStart: CustomEvent<void> Fires before the validation request is sent.
This event can be prevented with event.preventDefault() to cancel validation.
- Example
- const validateNetworkTopologyElement = document.querySelector("arcgis-utility-network-validate-network-topology");validateNetworkTopologyElement.addEventListener("arcgisValidateNetworkTopologyStart", (event) => {event.preventDefault();});
Type definitions
Disabled
Component state when validation is unavailable because the component cannot run.
Executing
Component state while utility network topology validation is currently running.
Ready
Component state when component dependencies are loaded and validation can execute.
Success
Component state after validation completes successfully.
message
- Type
- string
ValidateNetworkTopologyError
Component state when validation or setup encounters an error.
type
- 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.