nearestVertex static method
- required Geometry geometry,
- required ArcGISPoint point,
Returns a ProximityResult that describes the nearest vertex in the input geometry to the input point.
If the specified geometry is a polyline, polygon, or envelope, 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 geometry, use GeometryEngine.nearestCoordinate. For envelopes, the resulting ProximityResult.partIndex will always be invalid.
Input geometries with true curves (where Geometry.hasCurves is true) are supported, although curve segments do not affect the return value.
Parameters:
geometry— A geometry object.point— The point of interest.
Return Value: A struct containing the results of the operation.