Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get More than 60 results #103

Open
ravipatel2293 opened this issue Sep 17, 2017 · 2 comments
Open

Get More than 60 results #103

ravipatel2293 opened this issue Sep 17, 2017 · 2 comments

Comments

@ravipatel2293
Copy link

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.

@SBillion
Copy link

@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

@joeyk16
Copy link

joeyk16 commented Jun 27, 2019

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants