-3

I want to get all the businesses within 10 miles of my location in Swift. I tried using the geocoder from CoreLocation and GoogleMaps and it gives me random places but I just want to see all the businesses near my location. Is that possible or do I have to cut my search to restaurants, cafe, etc.?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Jov
  • 31
  • 1
  • 9
  • What's a business? A restaurant? A motorcycle repair shop? A stockbroker? A real estate agent? A day care center? A programmer? – matt Jul 29 '18 at 17:36
  • @matt yes everything that is considered as a business by google. – Jov Jul 29 '18 at 18:02

1 Answers1

0

you can use this google api for getting nearby businesses

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=1500&type=restaurant&keyword=cruise&key=YOUR_API_KEY

also you can see all available keywords from https://developers.google.com/places/web-service/supported_types

for using multiple keywords simultaneously

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=1500&type=atm%7Chospital&key=YOUR_API_KEY

add keywords seperated by %7C

midhun p
  • 1,987
  • 18
  • 24
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/20704267) – mmvsbg Aug 28 '18 at 09:44
  • thank you for the advice :) add keywords seperated by %7C – midhun p Aug 28 '18 at 10:41