简体   繁体   中英

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:

在此处输入图片说明

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM