nearestVertex

fun nearestVertex(geometry: Geometry, point: Point): ProximityResult?

Returns a ProximityResult that describes the nearest vertex in the input geometry to the input point. Input geometry of type Envelope is not supported. To find the nearest vertex on an Envelope, convert it to a Polygon first.

If the specified geometry is a polyline or polygon, the nearest vertex is the closest ending position of the line segment that comprises the geometry. It may not necessarily be the closest point of the line segment. If you want to obtain the closest point in the polyline or polygon use GeometryEngine.nearestCoordinate(Geometry, Point).

Input geometries with true curves (where Geometry.hasCurves is true) are supported, although curve segments do not affect the return value.

Return

A struct containing the results of the operation.

Since

200.1.0