def menu_item_clicked(self, item, map_id): """Switch to the clicked map source.""" if self.get_active(): MapView.set_map_source(MAP_SOURCES[map_id])