0

我的 Kinvey 的 Google Places 功能运行良好,唯一没有运行的是当我的实体被我的查询填充时它只返回 20 个结果,即使我设置了 Query.Setlimit(100) 和查询.setSkip(0)

我正在使用:

安卓工作室 0.6.1

Kinvey-Android-Lib 2.6.14

Kinvey-Java-2.6.14

这是一个代码片段。

    Query qry = new Query(new MongoQueryFilter.MongoQueryFilterBuilder());
    qry.setLimit(50);
    qry.setSkip(0);
    qry.nearSphere("_geoloc", marker.getPosition().latitude,
                    marker.getPosition().longitude, 100);
    AsyncAppData<EventEntity> locs = kinveyclient.appData("locations",
    EventEntity.class);
    locs.get(qry, new KinveyListCallback<EventEntity>() {
        @Override
        public void onSuccess(EventEntity[] eventEntities) {
    ... 
            // code executes fine but eventEntities.length 
             always = 20 regardless of location, Limit or Skip
    }

我错过了什么吗?

4

1 回答 1

0

我还没有使用过,Kinvey Library但我从个人经验中知道Google Places Api,默认情况下返回的结果只有 20 个。查看关于 Location 的 Kinvey Docs,它指的是Google Places API

其中指出:

By default, each Nearby Search or Text Search returns up to 20 establishment results per query; however, each search can return as many as 60 results, split across three pages. If your search will return more than 20, then the search response will include an additional value — next_page_token.

于 2014-07-01T23:00:08.470 回答