refactor: combine the checks for megaregion view range into a single place.