Wednesday, 11 September 2013

How to find the users within 10miles using latitude and longitude of the user in rails?

How to find the users within 10miles using latitude and longitude of the
user in rails?

I have latitude and longitude of all the user. I have to find the user who
is near to me (around 10 miles) from my current latitude and longitude.
And i have to give it as response in json. I have tried to configure
geokit gem for this but it showed me some error like
WARNING: geokit-rails requires the Geokit gem. You either don't have the
gem installed,
or you haven't told Rails to require it. If you're using a recent version
of Rails:
config.gem "geokit" # in config/environment.rb
and of course install the gem: sudo gem install geokit
so i have moved to geocoder. What should i do with this geocoder for
finding users with the above said conditions? please help me.

No comments:

Post a Comment