python-google-places icon indicating copy to clipboard operation
python-google-places copied to clipboard

Get More than 60 results

Open ravipatel2293 opened this issue 7 years ago • 2 comments

Hello, This library is pretty cool. I'm loving it to use in my application. But here, i have small concern. Google place api is limited to give upto 60 results around a lat and long.So is there a way so i can get more than 60 results around a particular lat and long? Because currently i can get only 60 clinics in my app when user search even thought there are around 250 clinics around 20,000 meters of particular lat and log.

ravipatel2293 avatar Sep 17 '17 12:09 ravipatel2293

@ravipatel2293 The only way you have is to move around your lat/lng to get 60 results again and merge. This is not something to do for an UI search but more to find all clinics in a zone. You could do a script for this and keep the google_place_ids in your database (you have the right to do this). This is a good way to get a populated map on your side. Use the Details API to get information on the place from google and add some from your business

SBillion avatar Jan 26 '18 08:01 SBillion

@ravipatel2293 I know this is old but I may help someone else.

I wrote this solution in ruby.

alt text

  1. Get the south west, and north east coordiate.

  2. Then you will have to create the coordinates for a grid. For ruby I used the GeoPoint gem. For a point I can say give me the coordinates 1km west of this point GeoPoint.new(point_1.destination_point(0, 1.0).to_dms)

  3. Once you have the list of coordinates (from the grid) send them all one by one to Google Places to generate a list.

  4. Merge the list and make sure they're unique.

joeyk16 avatar Jun 27 '19 06:06 joeyk16