import { execute, executeMany, supportsCurves } from "@arcgis/core/geometry/operators/unionOperator.js";const { execute, executeMany, supportsCurves } = await $arcgis.import("@arcgis/core/geometry/operators/unionOperator.js");- Since
- ArcGIS Maps SDK for JavaScript 4.31
Perform a topological union (dissolve) operation on 2D geometries.

Functions
| Name | Return Type | Object |
|---|---|---|
| | ||
| | ||
| |
execute
Function
Perform a topological union operation on two geometries.
- Signature
-
execute (geometry1: GeometryUnion, geometry2: GeometryUnion): GeometryWithoutMeshUnion | null | undefined
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry1 | The first geometry to union with. | | |
| geometry2 | The second geometry to union with. | |
- Returns
- GeometryWithoutMeshUnion | null | undefined
Returns the union of the two geometries as a geometry or null.
Example
// Return the union of two polygonsconst union = unionOperator.execute(polygon1, polygon2); executeMany
Function
Perform a topological union operation on a geometry set.
- Signature
-
executeMany (geometries: GeometryUnion[]): GeometryWithoutMeshUnion | null | undefined
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometries | The array of geometries to union. All the geometries must have the same spatial reference. | |
- Returns
- GeometryWithoutMeshUnion | null | undefined
Returns the union of
geometriesas a geometry or null.
Variables
supportsCurves
Variable
Indicates if the operator supports input geometries that contain curves.
The value will always be true.
- Type
- boolean