import { accelerateGeometry, execute, supportsCurves } from "@arcgis/core/geometry/operators/overlapsOperator.js";const { accelerateGeometry, execute, supportsCurves } = await $arcgis.import("@arcgis/core/geometry/operators/overlapsOperator.js");- Since
- ArcGIS Maps SDK for JavaScript 4.31
Performs a relational operation to determine if two 2D geometries of the same dimension overlap.

Functions
| Name | Return Type | Object |
|---|---|---|
| | ||
| | ||
| |
accelerateGeometry
Accelerate a geometry. This method prepares the geometry for faster overlaps operations when the same geometry is tested multiple times (e.g. in a loop with hundreds of iterations). See the Acceleration guide topic for more information.
- Signature
-
accelerateGeometry (geometry: GeometryUnion): boolean
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry | The geometry to accelerate. | |
- Returns
- boolean
Returns
trueif the geometry was successfully accelerated.
execute
Perform the overlaps operation on two geometries.
- Signature
-
execute (geometry1: GeometryUnion, geometry2: GeometryUnion): boolean
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry1 | The base geometry that is tested for the "overlaps" relationship with | | |
| geometry2 | The comparison geometry that is tested for the "overlaps" relationship with | |
- Returns
- boolean
Returns
trueif the intersection set results in a geometry different from both of the input geometries, but of the same dimension. For example, ifgeometry1andgeometry2are both polygons, then they must return a polygon in order to overlap. If two polygons cross each other at exactly one point then no overlap has occurred because points have a dimension of 0 and polygons have a dimension of 2. See the Working with spatial relationship operators guide topic on dimensionality for more details.
Example
// Returns true if one geometry overlaps another,// but is not contained or disjointedconst isOverlapping = overlapsOperator.execute(polygon1, polygon2);Variables
supportsCurves
Indicates if the operator supports input geometries that contain curves.
The value will always be true.
- Type
- boolean