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
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

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 Geometry

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 Geometry

The first geometry.

geometry2 Geometry

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.

The developer dashboard has moved

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close