I'm wondering if its possible to use the Google-Maps-for-Rails gem to find a list of points that are saved in the database that are within a specified radius of a given point. For example, how would I find all the points in my database that are within 20 miles of the Statue of Liberty.
I couldn't find anything in the documentation that goes over this scenario, unless I missed it.
Thank you for looking.
I don't think Google Maps for Rails does this out of the box. I ended up using Google Maps for Rails for taking care of generating the map, and using the Geocoder gem to do geocoding and scoping my data points.
With both gems, in my model I have:
In my controller I have:
def index
end
This seems to be working just fine, but I'll leave this question open a bit in case there's a better answer.