Get closest point to geometry
This sample shows how to get the closest point on a geometry from another point or position. Drag the green marker to see the calculation update.