public static void configureContextMenu(final Menu menu, final boolean showElevationChart, final IGeoItemSupplier route, final boolean hidePerDefault) {
        MenuUtils.enableIconsInOverflowMenu(menu);

        final boolean isIndividualRoute = isIndividualRoute(route);
        final MenuItem elevationChart = menu.findItem(R.id.menu_showElevationChart);
        configureMenuItem(elevationChart, showElevationChart, null);
        elevationChart.setEnabled(route instanceof Route);
        configureMenuItem(menu.findItem(R.id.menu_edit), isIndividualRoute, hidePerDefault);
        configureMenuItem(menu.findItem(R.id.menu_color), !isIndividualRoute, hidePerDefault);
        configureMenuItem(menu.findItem(R.id.menu_rename), !isIndividualRoute, null);
        configureMenuItem(menu.findItem(R.id.menu_center), true, hidePerDefault);
        configureMenuItem(menu.findItem(R.id.menu_optimize), isIndividualRoute, null);
        configureMenuItem(menu.findItem(R.id.menu_refresh), isIndividualRoute, null);
        configureMenuItem(menu.findItem(R.id.menu_invert_order), isIndividualRoute, null);
        configureMenuItem(menu.findItem(R.id.menu_visibility), route != null, hidePerDefault);
        configureMenuItem(menu.findItem(R.id.menu_delete), true, hidePerDefault);
        configureMenuItem(menu.findItem(R.id.indivroute_export_route), isIndividualRoute, null);
        configureMenuItem(menu.findItem(R.id.indivroute_export_track), isIndividualRoute, null);
        configureMenuItem(menu.findItem(R.id.indivroute_load), isIndividualRoute, null);
        configureVisibility(menu.findItem(R.id.menu_visibility), route.isHidden());
    }
show a popup for track/individual route, opened by using a long-tap on that item on the map
main/src/main/java/cgeo/geocaching/maps/RouteTrackUtils.java