import MergeFeaturesWorkflow from "@arcgis/core/widgets/Editor/MergeFeaturesWorkflow.js";const MergeFeaturesWorkflow = await $arcgis.import("@arcgis/core/widgets/Editor/MergeFeaturesWorkflow.js");- Inheritance
- MergeFeaturesWorkflow→
Workflow<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.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
| readonly inherited | D | |
| readonly inherited | ||
| readonly | | |
| readonly inherited | ||
| readonly inherited | ||
| readonly | | |
| readonly inherited | ||
| readonly inherited | S | |
| readonly | "merge-features" | |
data
- Type
- D
The shared workflow data. This can be either CreateFeaturesWorkflowData, UpdateWorkflowData, UpdateFeaturesWorkflowData, MergeFeaturesWorkflowData, or SplitFeatureWorkflowData.
formViewModel
The instance of BatchAttributeFormViewModel used by the workflow to manage the attributes of the resulting features.
stepId
- Type
- S
The name of the current step in the workflow.
Methods
| Method | Signature | Class |
|---|---|---|
| inherited | cancel(options?: CancelWorkflowOptions): Promise<void> | |
| inherited | commit(): Promise<void> | |
| inherited | emit<Type extends EventNames<this>>(type: Type, event?: this["@eventTypes"][Type]): boolean | |
| inherited | hasEventListener<Type extends EventNames<this>>(type: Type): boolean | |
| inherited | next(): Promise<void> | |
| inherited | on<Type extends EventNames<this>>(type: Type, listener: EventedCallback<this["@eventTypes"][Type]>): ResourceHandle | |
| inherited | previous(options?: WorkflowPreviousOptions): Promise<void> | |
| inherited | reset(): Promise<void> | |
| inherited | start(): Promise<any> |
cancel
- Signature
-
cancel (options?: CancelWorkflowOptions): Promise<void>
Cancels the active workflow.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| options | An object with the following properties. | |
emit
- Signature
-
emit <Type extends EventNames<this>>(type: Type, event?: this["@eventTypes"][Type]): boolean
- Type parameters
- <Type extends EventNames<this>>
Emits an event on the instance. This method should only be used when creating subclasses of this class.
hasEventListener
- Signature
-
hasEventListener <Type extends EventNames<this>>(type: Type): boolean
- Type parameters
- <Type extends EventNames<this>>
Indicates whether there is an event listener on the instance that matches the provided event name.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| type | Type | The name of the event. | |
- Returns
- boolean
Returns true if the class supports the input event.
on
- Signature
-
on <Type extends EventNames<this>>(type: Type, listener: EventedCallback<this["@eventTypes"][Type]>): ResourceHandle
- Type parameters
- <Type extends EventNames<this>>
Registers an event handler on the instance. Call this method to hook an event with a listener.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| 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).Property Type Description remove Function When 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
- Signature
-
previous (options?: WorkflowPreviousOptions): Promise<void>
Moves to the previous step in the workflow.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| options | Options when calling this method. | |