Google 根据区域轮廓而不是半径放置 API 结果

Google Places API results based on area outline instead of radius

我正在使用 Google 地点 API 到 return 列表结果创建一个目录。

我在搜索区域时遇到问题,因为它默认基于半径的结果并且不会捕获该区域的最外角,除非我们指定了很大的半径,在这种情况下它会捕获来自邻近区域的大量结果地区。

是否可以进行特定搜索 return 基于边界而不是半径的列表。

例如,在布拉格,大城市中有 22 个区域。

如果我搜索布拉格 4 并使用 Google 自动完成 select 区域 "Prague 4" 它会给我基于半径的结果,其中包括许多来自其邻居 "Prague 2" 的结果因为 google 将图钉放在布拉格 4 区和 2 区的边界上。

非常感谢任何帮助,因为这是一个难题。

这里是一张布拉格 4 区边界的图片,布拉格 2 区就位于它的正上方。

如何只在红色边界线内出结果?

Prague 4 region outline google maps

在 public 问题跟踪器中提交了类似于您的功能请求:

https://issuetracker.google.com/issues/35827732

如您所见,Google 将其设置为 Won't Fix (Intended Behavior) 状态,回复如下:

In fact, Places API will approximate your location and radius to a roughly rectangular region (as typically defined by bounds in the Geocoding API) that fits the circle defined by your location and radius.