Handles

AMD: require(["esri/core/Handles"], (Handles) => { /* code goes here */ });
ESM: import Handles from "@arcgis/core/core/Handles";
Class: esri/core/Handles
Inheritance: Handles Accessor
Since: ArcGIS API for JavaScript 4.7

This class helps manage a group of handles.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
Show inherited properties Hide inherited properties
Name Type Summary Class
Stringmore details

The name of the class.

more detailsAccessor

Property Details

declaredClass Stringreadonly inherited

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

Method Overview

Name Return Type Summary Class
more details

Adds a group of handles.

more detailsHandles
Booleanmore details

Returns true if a group exists for the provided key, false otherwise.

more detailsHandles
more details

Removes a group of handles.

more detailsHandles
more details

Removes all handles.

more detailsHandles

Method Details

add(handles, key)

Adds a group of handles.

Parameters:

An array or collection handles to group.

key *
optional

group handle key

Example:
let handles = new Handles();

handles.add(handle); // added to the default group
handles.add([handle1, handle2]); // added to the default group

handles.add(handle, "handle-group");
handles.add([handle1, handle2], "other-handle-group");
has(key){Boolean}

Returns true if a group exists for the provided key, false otherwise.

Parameter:
key *

group handle key

Returns:
Type Description
Boolean
remove(key)

Removes a group of handles.

Parameter:
key *
optional

A group key or an array or collection of group keys to remove.

Example:
let handles = new Handles();

handles.remove(); // removes handles from default group

handles.remove("handle-group");
handles.remove("other-handle-group");
removeAll()

Removes all handles.

Type Definitions

Handle

A handle to a highlight call result. The handle can be used to remove the installed highlight.

Property:
remove Function

Removes the handle.

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