AMD:
require(["esri/geometry/operators/overlapsOperator"], (overlapsOperator) => { /* code goes here */ });
ESM:
import * as overlapsOperator from "@arcgis/core/geometry/operators/overlapsOperator.js";
Object:
esri/geometry/operators/overlapsOperator
Since: ArcGIS Maps SDK for JavaScript 4.31
beta
Performs a relational operation to determine if two 2D geometries of the same dimension overlap.
Method Overview
Name | Return Type | Summary | Object |
---|---|---|---|
Accelerate a geometry. | overlapsOperator | ||
Perform the overlaps operation on two geometries. | overlapsOperator |
Method Details
-
accelerateGeometry
accelerateGeometry(geometry){Boolean}
-
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).
Parametergeometry GeometryThe geometry to accelerate.
ReturnsType Description Boolean Returns true
if the geometry was successfully accelerated.
-
execute
execute(geometry1, geometry2){Boolean}
-
Perform the overlaps operation on two geometries.
ParametersReturnsType Description Boolean Returns true
if the intersection set results in a geometry different from both, but of the same dimension.Example// Returns true if one geometry overlaps another, // but is not contained or disjointed const isOverlapping = overlapsOperator.execute(polygon1, polygon2);