calculate the distance from the markers on the map