Mike Simz
Mike Simz

Reputation: 4026

Get Popular Locations close by - Google Maps/Places SDK for iOS

I'm investigating how and if there is a way to get a list of popular locations near you (or within an area) using the Google Maps/Places API. Please see the attached screenshot for what I am referring to:

enter image description here

You'll notice the "Popular Locations in Toronto, On" section. Is there a way to get a list of these by passing in your current location, whether that be with coordinates or simply an address? I'm trying to understand how this was achieved in the above screenshot. Any help would be greatly appreciated. Thanks in advance!

Upvotes: 0

Views: 1030

Answers (1)

Prateek Varshney
Prateek Varshney

Reputation: 1421

You can use this web service api

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=(latitude),(longitude)&radius=5000&key=(api_key)

to get all the nearby places. It also contains mechanisms to filter, keyword, etc.

You can check out this link https://developers.google.com/places/web-service/search to see a list of required and optional parameters that you can pass additionally.

In case you want to use native iOS sdk https://developers.google.com/places/ios-api/start this is a good place to start.

Upvotes: 1

Related Questions