equalsOperator

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

Performs a relational operation to determine if two 2D geometries are topologically equal.

Property Overview

Name Type Summary Object

Indicates if the operator supports input geometries that contain curves.

equalsOperator

Property Details

supportsCurves

Property
supportsCurves Booleanreadonly

Indicates if the operator supports input geometries that contain curves.

Default Value:true

Method Overview

Name Return Type Summary Object

Accelerate a geometry.

equalsOperator

Perform the equals operation on two geometries.

equalsOperator

Method Details

accelerateGeometry

Method
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).

Parameter
geometry GeometryUnion

The geometry to accelerate.

Returns
Type Description
Boolean Returns true if the geometry was successfully accelerated.

execute

Method
execute(geometry1, geometry2){Boolean}

Perform the equals operation on two geometries.

Parameters
geometry1 GeometryUnion

The first geometry.

geometry2 GeometryUnion

The second geometry.

Returns
Type 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);

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