require(["esri/geometry/operators/unionOperator"], (unionOperator) => { /* code goes here */ });
import * as unionOperator from "@arcgis/core/geometry/operators/unionOperator.js";
esri/geometry/operators/unionOperator
Perform a topological union (dissolve) operation on 2D geometries.
Property Overview
Name | Type | Summary | Object |
---|---|---|---|
Indicates if the operator supports input geometries that contain curves. | unionOperator |
Property Details
-
supportsCurves
supportsCurves Booleanreadonly
-
Indicates if the operator supports input geometries that contain curves.
- Default Value:true
Method Overview
Name | Return Type | Summary | Object |
---|---|---|---|
Perform a topological union operation on two geometries. | unionOperator | ||
Perform a topological union operation on a geometry set. | unionOperator |
Method Details
-
execute
execute(geometry1, geometry2){GeometryUnion |null |undefined}
-
Perform a topological union operation on two geometries.
Parametersgeometry1 GeometryUnionThe first geometry to union with.
geometry2 GeometryUnionThe second geometry to union with.
ReturnsType Description GeometryUnion | null | undefined Returns the union of the two geometries as a geometry or null. Example// Return the union of two polygons const union = unionOperator.execute(polygon1, polygon2);
-
executeMany
executeMany(geometries){GeometryUnion |null |undefined}
-
Perform a topological union operation on a geometry set.
Parametergeometries GeometryUnion[]The array of geometries to union. All the geometries must have the same spatial reference.
ReturnsType Description GeometryUnion | null | undefined Returns the union of geometries
as a geometry or null.