Reputation: 534
I am using the Google Maps API and AutoComplete to make it easy for people to find restaurants around them. I have gotten this far but reading the documentation for it can be confusing. Is it possible to get a list of all the eating spots around Cupertino and if so how can it be achieved? Will I have to use SwiftyJson and or Alamofire in order to achieve this or does Google provides all the tools necessary to complete it?
Upvotes: 1
Views: 907
Reputation: 4960
Use Google Places API
to get a list of all eating spots around the area. Achieve it by including the parameter types
values to filter place searches.
Below is a sample code snippet how to use Place types:
Search specific place in city by given type: https://maps.googleapis.com/maps/api/place/textsearch/json?query= [Search place Name]+in+[City Name]&type=[Place Type]&sensor=true&key= [API Key]
You can use type food
and restaurant
like type=food|restaurant
for more information how to use Place Types, here's the link: https://developers.google.com/places/supported_types
Upvotes: 1