Added options to close layers, map and mapview.