Calculate Distance from Route Sample This sample shows how to use the Spatial Math and Directions module to calculate the distance a point is from a route line. Drag the pushpin to see the updated distance from the route.