Move map view dialog code into the appropriate class.