问题描述
以下网址请求未按地点类型过滤地点:
The following URL Request is not filtering places by their types:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?type=establishment&location=-15.8374808,-48.0125697&radius=100&key=[YOUR_API_KEY_HERE]
查询字符串type=establishment
不是过滤属性.
The query string type=establishment
is not filtering property.
注意:在搜索末尾插入您的Google API密钥.
Note: insert your Google API Key in the end for search.
编辑:我相信只有第一个结果不在过滤类型中.是状态.
Edit: I believe only the first result is not in the filtered type. It's the state.
推荐答案
establishment
类型不在支持的类型用于地点搜索.
The establishment
type is not in the list of supported types for place searches.
因此,您的查询将忽略此类型过滤器,就好像您在发出以下无类型请求一样:
So your query is ignoring this type filter as if you were making the following typeless request:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-15.8374808,-48.0125697&radius=100&key=KEY
您需要使用受支持的类型,例如store
:
You'll need to use a supported type such as e.g. store
:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?type=store&location=-15.8374808,-48.0125697&radius=100&key=KEY
希望这会有所帮助!
这篇关于Google Places API-附近搜索未按类型过滤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!