如何获得20+的结果来自谷歌API的地方? [英] How to get 20+ result from Google Places API?

查看:174
本文介绍了如何获得20+的结果来自谷歌API的地方?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个应用程序中,我得到自动取款机附近的用户的列表。对于我使用谷歌API的地方,但每次仅返回20的结果。我想获得更多的成果。在API文档也提到这样它会返回20的结果,但我想知道,有没有什么办法,我可以得到更多的数据,或者我要创建我自己的数据库是什么? 另外我发现在API的是,它并不拥有所有的自动取款机的印度。这些信息也不准确一些的位置。所以,请建议我一些想法,我应该用我自己的数据库或不?我知道我可以在谷歌的地方注册的地方,但那里的问题是,每次都返回只有20的结果;总之,如果这个问题解决那么这将是巨大的,使用API​​的地方..

I am developing a app in which i am getting the list of ATM's near by the user. For that i am using Google Places API, but every time it returns 20 result only. I want to get more results. In the API doc it is mention that it will return 20 result but i would like to know that is there any way i can get more data or I have to create my own database for that? Also what i found in the API is that it does not have all the ATM's for India. The information is also not accurate for some of the location. So Please suggest me some idea for that i should use my own database or not? I know that i can register places in the Google Places but there the problem is that every time it returns only 20 result; if anyhow this problem is resolve then it will be great to use the Places API..

请好心帮我.....

Please kindly help me.....

推荐答案

根据文档: <一href="http://$c$c.google.com/intl/en/apis/maps/documentation/places/#PlaceSearchResponses">http://$c$c.google.com/intl/en/apis/maps/documentation/places/#PlaceSearchResponses

编辑:将API现在支持高达60条分页。详情参见下面的。

Place API now supports pagination of up to 60 results. See below for details.

该场所API将返回高达查询20机构;然而,每次搜索可以返回多达60条,分成了三页。如果您的搜索将返回超过20个,然后搜索响应将包括一个额外的参数 - next_page_token。的next_page_token值传递到一个新的地方搜索page_token参数,看看下一组的20个结果。

The Places API will return up to 20 establishments 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 parameter — next_page_token. Pass the value of next_page_token to the page_token parameter of a new place search to see the next set of 20 results.

也有严格的服务条款指定你不能pre-取,缓存或存储内容,除非它是内容标识符或键就被允许存储从一个地方搜索,即参考令牌: <一href="http://$c$c.google.com/intl/en/apis/maps/terms.html#section_10_1_3">http://$c$c.google.com/intl/en/apis/maps/terms.html#section_10_1_3

There is also strict terms of service that specify you cant Pre-Fetch, Cache, or Store Content unless it is the content identifier or key you are permitted to store i.e. reference token from a places search: http://code.google.com/intl/en/apis/maps/terms.html#section_10_1_3

在关于不能够找到自动取款机在印度。所有的地方都在类型分类建立,直到谷歌拥有足够的元数据的地方它归类在更具体的地方类型,如 ATM 咖啡厅等一个解决,可能会找到更多的结果是使用关键字参数,你的要求的东西,如'ATM','银行'或'金融'作为值。 按文档:<一href="http://$c$c.google.com/apis/maps/documentation/places/">http://$c$c.google.com/apis/maps/documentation/places/ 该关键字参数匹配所有可用字段,包括但不限于姓名,类型,地址,以及顾客评论等第三方内容。

In regards to not being able to find ATM's in India. All places are categorized under the type establishment until Google has enough metadata about a place to categorize it under more specific place types like ATM, cafe, bar etc. A work around that may find more results is to use the keyword parameter in your request with something like 'ATM', 'bank' or 'finance' as the value. As per the documentation: http://code.google.com/apis/maps/documentation/places/ The keyword parameter is matched against all available fields, including but not limited to name, type, and address, as well as customer reviews and other third-party content.

这篇关于如何获得20+的结果来自谷歌API的地方?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆