Calculates distance for every node on map to make comparison easier -
may change later based on overhead