Click on the map to find the closest point.

Closest point:

Get closest point to position This sample shows how to calculate the closest point to a given position, in this case, where the user clicked on the map. The closest point will have it's color changed to red. This is achieved by looping over through the data and calculating the distance between the position and each point using the atlas.math.getDistanceTo function.