Google places api restaurant types

后端 未结 3 533
隐瞒了意图╮
隐瞒了意图╮ 2020-12-29 04:54

When you search for a restaurant in Google places and go to the business profile (i.e.: https://plus.google.com/107507038669791289691/about?hl=en) the restaurant has a tag (

相关标签:
3条回答
  • 2020-12-29 05:05

    Separate your place types by PIPE symbol "|"

    try like this :

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

    0 讨论(0)
  • 2020-12-29 05:09

    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.

    0 讨论(0)
  • 2020-12-29 05: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.

    0 讨论(0)
提交回复
热议问题