AMD:
require(["esri/geometry/operators/equalsOperator"], (equalsOperator) => { /* code goes here */ });
ESM:
import * as equalsOperator from "@arcgis/core/geometry/operators/equalsOperator.js";
Object:
esri/geometry/operators/equalsOperator
Since: ArcGIS Maps SDK for JavaScript 4.31
beta
Performs a relational operation to determine if two 2D geometries are topologically equal.
Method Overview
Name | Return Type | Summary | Object |
---|---|---|---|
Accelerate a geometry. | equalsOperator | ||
Perform the equals operation on two geometries. | equalsOperator |
Method Details
-
accelerateGeometry
accelerateGeometry(geometry){Boolean}
-
Accelerate a geometry. This method prepares the geometry for faster equals 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 equals operation on two geometries.
ReturnsType Description Boolean Returns true
if the two geometries are topologically equal.Example// Returns true if two geometries are equal const isEqual = equalOperator.execute(polyline1, polyline2);