Google 地点 API:如果按更多类型过滤,结果会更少(反之亦然)

Google Places API: Less results if filtering by more types (and vice versa)

我的应用程序使用 Google Places Web API.

显示附近的地点

用户可以控制请求中搜索的地点类型。 多个类型用管道符号 | 连接。我使用 &rankby=distance,因为显眼度对应用程序无关紧要。

我注意到,请求具有 "a lot" 类型 returns 的附近地点的结果比按单一类型过滤的结果少。

示例

我正好住在购物中心对面,所以我很确定附近有20多家商店。第一个查询也包含 store 作为过滤器。

问题

我希望始终显示尽可能多的结果。有人遇到过同样的问题吗?是否有任何我没有看到的文档,关于这个主题的任何内容?

我有点迷茫,因为我不知道从哪里开始寻找或如何解决这个问题。

感谢@AndrewR 的评论,我偶然发现了一个问题的评论,内容如下:

[Google Places API does not] support specifying more than 20 types at a time

Comment on bug report from Sep 1, 2014

几句话就解决了我的问题。我希望文档已经说明了这一点。

请注意,一次搜索多个类型已被弃用。见 http://googlegeodevelopers.blogspot.com.au/2016/02/changes-and-quality-improvements-in_16.html:

Beginning Feb 16, 2016, we are replacing the types restriction parameter with a new type search parameter. If you have been using the types parameter for Nearby Search, Text Search or Radar Search you will be affected.

Type search works similarly to types restriction, but it only supports one type per request.

Requests using the types parameter and those specifying multiple types (for example, types=hospital|pharmacy|doctor) will continue to return results until Feb 16, 2017, but we do not recommend using multiple types in a search request. After that date, requests with multiple types will no longer be supported. To ensure the best possible search results for your users, we recommend using a single type in search requests.