使用Google Places API获取20多个结果 [英] Obtaining more than 20 results with Google Places API

查看:277
本文介绍了使用Google Places API获取20多个结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我使用Places库进行搜索,每次只返回20个结果。

我想开发一个地图应用程序,它将显示指定地点附近的银行。我应该怎么做,如果我想得到更多的结果?

,API得到了增强,使这个答案过时(或至少不完整)。请参阅如何从Google Places API获得20+结果?获得更多信息。

文档指出Places API最多可返回20个结果。这并不表示有任何方法可以改变这个限制。所以,简短的答案似乎是:你不能。



当然,你可以通过对多个位置进行查询来伪造它,然后合并/重复结果。虽然这是一种廉价的黑客攻击,并且可能无法很好地发挥作用。我会先检查一下,确保它不违反服务条款。


I want to develop a map application which will display the banks near a given place.

I use the Places library to search and everytime it just return 20 results. What should I do if I want more results?

解决方案

UPDATE: Since I originally wrote this answer, the API was enhanced, making this answer out of date (or, at least, incomplete). See How to get 20+ result from Google Places API? for more information.

ORIGINAL ANSWER:

The documentation says that the Places API returns up to 20 results. It does not indicate that there is any way to change that limit. So, the short answer seems to be: You can't.

Of course, you might be able to sort of fake it by doing queries for several locations, and then merging/de-duplicating the results. It's kind of a cheap hack, though, and might not work very well. And I'd check first to make sure it doesn't violate the terms of service.

这篇关于使用Google Places API获取20多个结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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