unionOperator

AMD: require(["esri/geometry/operators/unionOperator"], (unionOperator) => { /* code goes here */ });
ESM: import * as unionOperator from "@arcgis/core/geometry/operators/unionOperator.js";
Object: esri/geometry/operators/unionOperator
Since: ArcGIS Maps SDK for JavaScript 4.31
beta

Perform a topological union (dissolve) operation on 2D geometries.

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

Method
execute(geometry1, geometry2){Geometry |null}

Perform a topological union operation on two geometries.

Parameters
geometry1 Geometry

The first geometry to union with.

geometry2 Geometry

The second geometry to union with.

Returns
Type Description
Geometry | null Returns the union of the two geometries as a geometry or null.
Example
// Return the union of two polygons
const union = unionOperator.union([polygon1, polygon2]);

executeMany

Method
executeMany(geometries){Geometry |null}

Perform a topological union operation on a geometry set.

Parameter
geometries Geometry[]

The array of geometries to union.

Returns
Type Description
Geometry | null Returns the union of geometries as a geometry or null.

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