import { execute, supportsCurves } from "@arcgis/core/geometry/operators/isNearOperator.js";const { execute, supportsCurves } = await $arcgis.import("@arcgis/core/geometry/operators/isNearOperator.js");- Since
- ArcGIS Maps SDK for JavaScript 4.31
Performs a 2D relational operation that checks if two geometries are near each other.

Type definitions
Options
unit
- Type
- LengthUnit | undefined
The length unit of the distance.
Unless the unit option is set, the default is the geometry's spatial reference unit.
An error will be thrown if this is set for Geographic Coordinate Systems.
Functions
| Name | Return Type | Object |
|---|---|---|
| | |
| | ||
| |
execute
Returns true if the geometries are not further than the given 2D distance from each other.
- Signature
-
execute (geometry1: GeometryUnion, geometry2: GeometryUnion, distance: number, options?: Options): boolean
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry1 | The first geometry. | | |
| geometry2 | The second geometry. | | |
| distance | The distance (must be positive).
Unless the | | |
| options | Additional options. | |
- Returns
- boolean
Returns
trueif the minimum distance between the two geometries is equal or less thandistance.
Example
// Check if two geometries are near each otherconst isNear = isNearOperator.execute(point, polyline, 100);Variables
supportsCurves
Indicates if the operator supports input geometries that contain curves.
The value will always be true.
- Type
- boolean