Skip to content
import UtilityNetworkAssociationsViewModel from "@arcgis/core/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js";
Inheritance:
UtilityNetworkAssociationsViewModelAccessor
Since
ArcGIS Maps SDK for JavaScript 4.26

Provides the logic for the UtilityNetworkAssociations widget and component.

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.

connectivityAssociationsLineSymbol

autocast Property
Type
SimpleLineSymbol

A SimpleLineSymbol used for representing the polyline geometry that is being drawn for connectivity associations.

The default value is the following:

{
type: "simple-line",
color: [190, 159, 159, 1],
style: "short-dash",
width: 2
}

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

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

includeConnectivityAssociations

Property
Type
boolean

Indicates whether to query and display connectivity associations.

Default value
true

includeStructuralAttachmentAssociations

Property
Type
boolean

Indicates whether to query and display structural attachment associations.

Default value
true

maxAllowableAssociations

Property
Type
number

The maximum number of associations that can be returned from the server.

Default value
250

showArrowsConnectivity

Property
Type
boolean

Indicates whether to show arrows for connectivity associations.

Default value
false

showArrowsStructuralAttachment

Property
Type
boolean

Indicates whether to show arrows for structural attachment associations.

Default value
false

state

readonly Property
Type
UtilityNetworkAssociationsViewModelState

The view model's state.

Default value
"disabled"

structuralAttachmentAssociationsLineSymbol

autocast Property
Type
SimpleLineSymbol

A SimpleLineSymbol used for representing the polyline geometry that is being drawn for structural attachment associations. *

The default value is the following:

{
type: "simple-line",
color: [159, 190, 159, 1],
style: "short-dash",
width: 2
}

utilityNetwork

Property
Type
UtilityNetwork | null | undefined

Determines the utility network to use.

view

Property
Type
MapView | null | undefined

The view associated with the UtilityNetworkAssociations widget instance.

Methods

MethodSignatureClass
removeAssociations(): void
showAssociations(): Promise<void>

removeAssociations

Method
Signature
removeAssociations (): void

Removes all associations from the map.

Returns
void

showAssociations

Method
Signature
showAssociations (): Promise<void>

Queries associations within the current map extent.

Returns
Promise<void>

Type definitions

UtilityNetworkAssociationsViewModelState

Type definition
Type
"disabled" | "loading" | "ready" | "executing" | "warning"