Ole*_* Sh 6 google-maps google-maps-api-3 google-places-api
我想搜索纽约的所有咖啡馆和餐馆.当然,我可以使用文本搜索,因为它在这里推荐 - Google Places API搜索关键字和城市
但是,如果我发出请求,例如 https://maps.googleapis.com/maps/api/place/textsearch/json?query=cafe+New+York+food&sensor=false&key=MY_KEY
我得到的第一个元素是
"formatted_address":"316 Victoria Avenue,Chatswood NSW,Australia",
真的没办法按城市过滤数据吗?这个数据存在于地址中,为什么没有好的方法按城市过滤,只能通过关键字?
您可以location在查询中添加参数(还需要指定radius).
所以你的查询看起来像:
请参阅此处的完整文档:https: //developers.google.com/places/documentation/search#TextSearchRequests
| 归档时间: |
|
| 查看次数: |
6154 次 |
| 最近记录: |