为什么我没有从 Google 个地点 API 获得多种类型的结果?
Why I'm not getting multiple type result from Google Places API?
我想要不止一种类型的结果。在这个例子中,我想要服装店和沙龙。
查看我的查询:
"https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=" + params[0] + "," + params[1] + "&radius=5000&type=clothing_store,beauty_salon&sensor=true&key=" + GOOGLE_PLACES_API_KEY
我尝试了 ,
和 |
两者。没有得到多种类型的结果。
注意:如果我只使用单一类型,那么我得到了我所期望的。
根据Place search documentation,您通常只允许指定单一类型:
type
— Restricts the results to places matching the specified type. Only one type may be specified (if more than one type is provided, all types following the first entry are ignored). See the list of supported types.
我想要不止一种类型的结果。在这个例子中,我想要服装店和沙龙。
查看我的查询:
"https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=" + params[0] + "," + params[1] + "&radius=5000&type=clothing_store,beauty_salon&sensor=true&key=" + GOOGLE_PLACES_API_KEY
我尝试了 ,
和 |
两者。没有得到多种类型的结果。
注意:如果我只使用单一类型,那么我得到了我所期望的。
根据Place search documentation,您通常只允许指定单一类型:
type
— Restricts the results to places matching the specified type. Only one type may be specified (if more than one type is provided, all types following the first entry are ignored). See the list of supported types.