import * as isNearOperator from "@arcgis/core/geometry/operators/isNearOperator.js";
const isNearOperator = await $arcgis.import("@arcgis/core/geometry/operators/isNearOperator.js");
@arcgis/core/geometry/operators/isNearOperator
Performs a 2D relational operation that checks if two geometries are near each other.

Property Overview
| Name | Type | Summary | Object |
|---|---|---|---|
Indicates if the operator supports input geometries that contain curves. | isNearOperator |
Property Details
-
supportsCurves
PropertysupportsCurves Booleanreadonly -
Indicates if the operator supports input geometries that contain curves. The value will always be
true.
Method Overview
| Name | Return Type | Summary | Object |
|---|---|---|---|
Returns true if the geometries are not further than the given 2D distance from each other. | isNearOperator |
Method Details
-
execute
Methodexecute(geometry1, geometry2, distance, options){Boolean} -
Returns true if the geometries are not further than the given 2D distance from each other.
Parametersgeometry1 GeometryUnionThe first geometry.
geometry2 GeometryUnionThe second geometry.
distance NumberThe distance (must be positive). Unless the
unitoption is set, the default is the geometry's spatial reference unit.options ObjectoptionalAdditional options.
Specificationunit LengthUnitoptionalThe length unit of the distance. Unless the
unitoption is set, the default is the geometry's spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.ReturnsType Description Boolean Returns trueif the minimum distance between the two geometries is equal or less thandistance.Example// Check if two geometries are near each other const isNear = isNearOperator.execute(point, polyline, 100);