private void initFollowMyLocation(final boolean followMyLocation) {
        synchronized (inFollowMyLocation) {
            if (inFollowMyLocation[0] > 0) {
                return;
            }
            inFollowMyLocation[0]++;
        }
        Settings.setFollowMyLocation(followMyLocationSwitch);
        followMyLocationSwitch = followMyLocation;

        final ImageButton followMyLocationButton = activity.findViewById(R.id.map_followmylocation_btn);
        if (followMyLocationButton != null) { // can be null after screen rotation
            followMyLocationButton.setImageResource(followMyLocation ? R.drawable.map_followmylocation_btn : R.drawable.map_followmylocation_off_btn);
            followMyLocationButton.setOnClickListener(v -> initFollowMyLocation(!followMyLocationSwitch));
        }

        if (followMyLocation) {
            final Location currentLocation = LocationDataProvider.getInstance().currentGeo(); // get location even if none was delivered to the view-model yet
            centerMap(new Geopoint(currentLocation));
        }
        synchronized (inFollowMyLocation) {
            inFollowMyLocation[0]--;
        }
    }
Thread to Display (down)loaded caches. Started by {@link LoadRunnable} and {@link DownloadRunnable}
main/src/main/java/cgeo/geocaching/maps/CGeoMap.java