@Override
    public boolean onOptionsItemSelected(@NonNull final MenuItem item) {
        final int id = item.getItemId();
        if (id == R.id.menu_map_live) {
            mapOptions.isLiveEnabled = !mapOptions.isLiveEnabled;
            if (mapOptions.isLiveEnabled) {
                mapOptions.isStoredEnabled = true;
                mapOptions.filterContext = new GeocacheFilterContext(LIVE);
                caches.setFilterContext(mapOptions.filterContext);
                refreshMapData(false, true);
            }

            if (mapOptions.mapMode == MapMode.LIVE) {
                Settings.setLiveMap(mapOptions.isLiveEnabled);
            }
            caches.handleStoredLayers(this, mapOptions);
            caches.handleLiveLayers(this, mapOptions);
            ActivityMixin.invalidateOptionsMenu(this);
            if (mapOptions.mapMode == MapMode.SINGLE) {
                // reset target cache on single mode map
                targetGeocode = mapOptions.geocode;
            }
            mapOptions.mapMode = MapMode.LIVE;
            updateSelectedBottomNavItemId();
            mapOptions.title = StringUtils.EMPTY;
            setTitle();
        } else if (id == R.id.menu_filter) {
            showFilterMenu();
        } else if (id == R.id.menu_store_caches) {
            final Set<String> visibleCacheGeocodes = caches.getVisibleCacheGeocodes();
            CacheDownloaderService.downloadCaches(this, visibleCacheGeocodes, false, false, () -> caches.invalidate(visibleCacheGeocodes));
        } else if (id == R.id.menu_theme_mode) {
            this.renderThemeHelper.selectMapTheme(this.tileLayer, this.tileCache);
        } else if (id == R.id.menu_theme_options) {
            this.renderThemeHelper.selectMapThemeOptions();
        } else if (id == R.id.menu_as_list) {
            CacheListActivity.startActivityMap(this, new SearchResult(caches.getVisibleCacheGeocodes()));
            ActivityMixin.overrideTransitionToFade(this);
        } else if (id == R.id.menu_hillshading) {
            Settings.setMapShadingShowLayer(!Settings.getMapShadingShowLayer());
            item.setChecked(Settings.getMapShadingShowLayer());
            changeMapSource(mapSource);
        } else if (id == R.id.menu_hint) {
            menuShowHint();
        } else if (id == R.id.menu_compass) {
            menuCompass();
        } else if (LoggingUI.onMenuItemSelected(item, this, getSingleModeCache(), null)) {
            return true;
        } else if (id == R.id.menu_check_routingdata) {
            final BoundingBox bb = mapView.getBoundingBox();
            MapUtils.checkRoutingData(this, bb.minLatitude, bb.minLongitude, bb.maxLatitude, bb.maxLongitude);
        } else if (id == R.id.menu_check_hillshadingdata) {
            final BoundingBox bb = mapView.getBoundingBox();
            MapUtils.checkHillshadingData(this, bb.minLatitude, bb.minLongitude, bb.maxLatitude, bb.maxLongitude);
        } else if (HistoryTrackUtils.onOptionsItemSelected(this, id, () -> historyLayer.requestRedraw(), this::clearTrailHistory)
                || DownloaderUtils.onOptionsItemSelected(this, id)) {
            return true;
        } else if (id == R.id.menu_routetrack) {
            routeTrackUtils.showPopup(individualRoute, this::setTarget, null);
        } else {
            final String language = MapProviderFactory.getLanguage(id);
            final MapSource mapSource = MapProviderFactory.getMapSource(id);
            if (language != null || id == MAP_LANGUAGE_DEFAULT_ID) {
                item.setChecked(true);
                changeLanguage(language);
                return true;
            }
            if (mapSource != null) {
                item.setChecked(true);
                changeMapSource(mapSource);
                return true;
            }
            return super.onOptionsItemSelected(item);
        }
        return true;
    }
initialization with an empty subscription to make static code analysis tools more happy
main/src/main/java/cgeo/geocaching/maps/mapsforge/v6/NewMap.java