Kevin Kevinz Kevin Kevinz - 1 year ago 139
Objective-C Question

Google Places API - How to return nearest locations?

My application uses Google Places API Nearby search to grab the locations nearest to the user. I specify all the possible types found on "".

My search query looks a little something like this: ",%f&rankby=distance&types=accounting|amusement_park|aquarium|art_gallery|atm|bakery|bank|bar|beauty_salon|bicycle_store|book_store|bowling_alley|bus_station|cafe ... university|veterinary_care|zoo"

But by February 16, 2017, the types parameter will be deprecated and replaced with a single type parameter, so I will no longer be able to retrieve every possible nearby location.

What options do I have to be able to still do this?

Thanks for your time.

Answer Source

Just omit the types parameter. You want the API to restrict to all types, which is the same as wanting no type restriction at all. You're using rankby=distance, so you don't need to set more parameters than the location.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download