Added logic for handling when a device is rotated and the map view controller is no longer visible in portrait mode. Done through vid9