Google places api restaurant types

让人想犯罪 __ 提交于 2019-11-30 08:09:23

I think you would probably have to revert to the text search method on the api..

https://developers.google.com/places/documentation/search#TextSearchRequests

So your request would end up looking something like the below, restricted down to a specific area

https://maps.googleapis.com/maps/api/place/textsearch/json?query=Mexican+Restaurant&sensor=true&location=40.846,-73.938&radius=20&key=yourKeyHere

However this will return all other Mexican restaurants in the area, so if you just want to return the one result I would use the Place Details request instead.

I was also working in a project which need to get more details about a place using Google Maps and Google Places APIs, and I really spent many hours trying to find something that can help ( Google Places API, Google Maps API, google+ APIs, ... ) but nothing ... the only things that I found is theses 2 issues ( feature requests ) which I hope that Google will add to their APIs someday :

  • Issue N° 5260 with 13 stars.

  • Issue N°7878 with 4 stars.

I hope with this SO question that we get more interested persons to get the feature in a soon future version of Google Map or Google Places APIs.

For the Google Places for Work API, I didn't find any information to confirm or not that it contains such feature, but I don't think so.

Hope that can help.

kgandroid

Separate your place types by PIPE symbol "|"

try like this :

String types = "cafe|restaurant|museum" // Listing places only cafes, restaurants and museums.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!