check if locations are within a set distance from each other