private static GCWebAPI.WebApiSearch createSearchForFilter(final IConnector connector, @Nullable final GeocacheFilter pFilter, @NonNull final GeocacheSort sort, final int take, final int skip) {

        final GCWebAPI.WebApiSearch search = new GCWebAPI.WebApiSearch();
        search.setPage(take, skip);

        final GeocacheFilter filter = pFilter != null ? pFilter : GeocacheFilter.createEmpty();

        //special case: if origin filter is present and excludes GCConnector, then skip search
        final OriginGeocacheFilter origin = GeocacheFilter.findInChain(filter.getAndChainIfPossible(), OriginGeocacheFilter.class);
        if (origin != null && !origin.allowsCachesOf(connector)) {
            return null;
        }

        final List<BaseGeocacheFilter> filterAndChain = filter.getAndChainIfPossible();
        for (BaseGeocacheFilter baseFilter : filterAndChain) {
            fillForBasicFilter(baseFilter, search);
        }

        search.setSort(GCWebAPI.WebApiSearch.SortType.getByCGeoSortType(sort.getEffectiveType()), sort.isEffectiveAscending());

        return search;

    }
Searches the view port on the live map with Strategy.AUTO

@param viewport Area to search
main/src/main/java/cgeo/geocaching/connector/gc/GCMap.java