Skip to content
import MergeFeaturesWorkflow from "@arcgis/core/widgets/Editor/MergeFeaturesWorkflow.js";
Inheritance:
MergeFeaturesWorkflowWorkflow<MergeFeaturesWorkflowData‚ MergeFeaturesWorkflowStep>Accessor
Since
ArcGIS Maps SDK for JavaScript 4.34

A read-only class containing the logic used when merging features using the Editor widget.

Currently only supported in 2D. Support is limited to merging features from a single layer at a time. Support is limited to polyline, polygon, and multipoint geometries.

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.
PropertyTypeClass
data
readonly inherited
D
declaredClass
readonly inherited
formViewModel
readonly
hasNextStep
readonly inherited
hasPreviousStep
readonly inherited
layer
readonly
started
readonly inherited
stepId
readonly inherited
S
type
readonly
"merge-features"

data

readonlyinherited Property
Type
D
Inherited from: Workflow

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

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

formViewModel

readonly Property
Type
FeatureFormViewModel

The instance of FeatureFormViewModel used by the workflow to manage the attributes of the resulting features.

hasNextStep

readonlyinherited Property
Type
boolean
Inherited from: Workflow

This property indicates whether there is a next step in the workflow.

hasPreviousStep

readonlyinherited Property
Type
boolean
Inherited from: Workflow

This property indicates if there is a previous step in the workflow.

layer

readonly Property
Type
EditorLayerUnion

The layer to which the features being merged belong.

started

readonlyinherited Property
Type
boolean
Inherited from: Workflow

Indicates whether the workflow is considered active.

Default value
false

stepId

readonlyinherited Property
Type
S
Inherited from: Workflow

The name of the current step in the workflow.

type

readonly Property
Type
"merge-features"

The type of the workflow.

Methods

MethodSignatureClass
cancel
inherited
cancel(options?: CancelWorkflowOptions): Promise<void>
commit
inherited
commit(): Promise<void>
emit
inherited
emit<Type extends EventNames<this>>(type: Type, event?: this["@eventTypes"][Type]): boolean
hasEventListener
inherited
hasEventListener<Type extends EventNames<this>>(type: Type): boolean
next
inherited
next(): Promise<void>
on
inherited
on<Type extends EventNames<this>>(type: Type, listener: EventedCallback<this["@eventTypes"][Type]>): ResourceHandle
previous
inherited
previous(options?: WorkflowPreviousOptions): Promise<void>
reset
inherited
reset(): Promise<void>
start
inherited
start(): Promise<any>

cancel

inherited Method
Signature
cancel (options?: CancelWorkflowOptions): Promise<void>
Inherited from: Workflow

Cancels the active workflow.

Parameters
ParameterTypeDescriptionRequired
options

An object with the following properties.

Returns
Promise<void>

Resolves when the active workflow is canceled.

commit

inherited Method
Signature
commit (): Promise<void>
Inherited from: Workflow

Call this method when the workflow is considered finished. This is used to help process the editing results.

Returns
Promise<void>

Resolves when the active workflow commits and processes the edited results.

emit

inherited Method
Signature
emit <Type extends EventNames<this>>(type: Type, event?: this["@eventTypes"][Type]): boolean
Type parameters
<Type extends EventNames<this>>
Inherited from: EventedMixin

Emits an event on the instance. This method should only be used when creating subclasses of this class.

Parameters
ParameterTypeDescriptionRequired
type
Type

The name of the event.

event
this["@eventTypes"][Type]

The event payload.

Returns
boolean

true if a listener was notified

hasEventListener

inherited Method
Signature
hasEventListener <Type extends EventNames<this>>(type: Type): boolean
Type parameters
<Type extends EventNames<this>>
Inherited from: EventedMixin

Indicates whether there is an event listener on the instance that matches the provided event name.

Parameters
ParameterTypeDescriptionRequired
type
Type

The name of the event.

Returns
boolean

Returns true if the class supports the input event.

next

inherited Method
Signature
next (): Promise<void>
Inherited from: Workflow

Moves to the next step in the workflow.

Returns
Promise<void>

Resolves when moved to the next step within the active workflow.

on

inherited Method
Signature
on <Type extends EventNames<this>>(type: Type, listener: EventedCallback<this["@eventTypes"][Type]>): ResourceHandle
Type parameters
<Type extends EventNames<this>>
Inherited from: EventedMixin

Registers an event handler on the instance. Call this method to hook an event with a listener.

Parameters
ParameterTypeDescriptionRequired
type
Type

An event or an array of events to listen for.

listener
EventedCallback<this["@eventTypes"][Type]>

The function to call when the event fires.

Returns
ResourceHandle

Returns an event handler with a remove() method that should be called to stop listening for the event(s).

PropertyTypeDescription
removeFunctionWhen called, removes the listener from the event.
Example
view.on("click", function(event){
// event is the event handle returned after the event fires.
console.log(event.mapPoint);
});

previous

inherited Method
Signature
previous (options?: WorkflowPreviousOptions): Promise<void>
Inherited from: Workflow

Moves to the previous step in the workflow.

Parameters
ParameterTypeDescriptionRequired
options

Options when calling this method.

Returns
Promise<void>

Resolves when moved to the previous step within the active workflow.

reset

inherited Method
Signature
reset (): Promise<void>
Inherited from: Workflow

Resets the workflow.

Returns
Promise<void>

Resolves when the active workflow is reset.

start

inherited Method
Signature
start (): Promise<any>
Inherited from: Workflow

Starts the workflow.

Returns
Promise<any>

Resolves when the active workflow starts.