Shows how to find the nearest vertex on a geometry to a given point.
Tap anywhere on the map. An orange marker will show the tapped location. A blue marker will show the polygon's nearest vertex to the tapped location. A red marker will show the nearest coordinate on the geometry.
- Get a
Point
to check the nearest vertex against. - Call
GeometryEngine.NearestVertex(inputGeometry, point)
. The returnedProximityResult
can be used to get the coordinate and distance between the vertex and point. - Call
GeometryEngine.NearestCoordinate(inputGeometry, point)
. The returnedProximityResult
can be used to get the coordinate and distance between the coordinate and point.
- GeometryEngine
- ProximityResult
Analysis, Geometry