The application I’m developing allows people to create events in their
local area; as part of this feature I want to display a list of, say,
the five most recent events within 30 miles of a person’s location.
have a User model and a Profiles model which contains the user’s
location (city, state, zip code) among other non-related personal
information. So what I would like to do is be able to do is to get a
list of upcoming events relative to that person’s location, and display
it on their “control panel” when they log in to the site.
at some point in the future I want to integrate with Google Maps to
display a map of the Event’s location on a particular event’s detail
page (i.e. “show” action in the controller); this isn’t required for
the Beta version of the site, but it’s something to consider since it
will be a feature later.
I’ve been looking at the Google Maps
API but I’m not sure if it would let me do what I really need, which
is to query for all zip codes within 30 miles of a given zip code, so I
can display the events to users who live within that radius and
hopefully get them to attend.
I have the book “RailsSpace”, and
it implements something similar to what I want with a database, but if
I go this route will it prevent me from using Google Maps at a later
date? I haven’t really looked yet to see if there are any plugins that
can help me out with this - I want to get a handle on the concepts I
need, and then work on the implementation.
To summarize, what I want to be able to do is:
- Display a list of the five most recent events within 30 miles of a user’s location on their profile page