public void animateCameraToIncludePosition(GoogleMap map, LatLng position, long delay) {
        if (!map.getProjection().getVisibleRegion().latLngBounds.contains(position)) {
            if (delay > 0) {
                new Handler(Looper.getMainLooper())
                        .postDelayed(() -> doAnimateCameraToIncludePosition(map, position), delay);
            } else {
                doAnimateCameraToIncludePosition(map, position);
            }
        }
    }
public void animateCameraToIncludePosition(GoogleMap map, LatLng position, long delay) {
        if (!map.getProjection().getVisibleRegion().latLngBounds.contains(position)) {
            if (delay > 0) {
                new Handler(Looper.getMainLooper())
                        .postDelayed(() -> doAnimateCameraToIncludePosition(map, position), delay);
            } else {
                doAnimateCameraToIncludePosition(map, position);
            }
        }
    }
public void animateCameraToIncludePosition ( GoogleMap map , LatLng position , long delay ) { if ( ! map . getProjection ( ) . getVisibleRegion ( ) . latLngBounds . contains ( position ) ) { if ( delay > 0 ) { new Handler ( Looper . getMainLooper ( ) ) . postDelayed ( ( ) -> doAnimateCameraToIncludePosition ( map , position ) , delay ) ; } else { doAnimateCameraToIncludePosition ( map , position ) ; } } }
If the position is not visible on the map, animate the camera to include it, after the delay.
If the position is not visible on the map animate the camera to include it after the delay .