Can now calculate the intersection distance according to the map