Kinvey:Google 地点位置查询 setlimit(>20) 仅返回 20 个结果,无论



我已经得到了Kinvey的Google Places功能工作得很好,唯一没有工作的是,当我的实体被我的查询填充时,它只返回20个结果,即使我设置query . setlimit(100)和query . setskip (0)

我用的是:

Android Studio 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
    }

我错过了什么吗?

我还没有使用Kinvey Library,但我从Google Places Api的个人经验中知道,默认情况下返回的结果只有20个结果。看看Kinvey文档中的位置,它指的是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.

相关内容

最新更新