Google Places Autocomplete, filter by establishmen

2019-07-19 17:01发布

问题:

I can use the API to search by establishments as shown in their guides(https://developers.google.com/places/ios-api/autocomplete), however I also know that a GMSPlace has a type, which can be a coffee shop/restaurant.

The ios api doesn't seem to have a simple "place search" like the web service does, it's either PlaceID search, or autocomplete.

Can I use the Autocomplete and filter my results based on the type?

回答1:

You can use GMSAutocompleteFilter to filter out establishment. establishment returns only places that are businesses.