I'm building a site where my users will be able to specify locations (say, their residence, etc.). Then, I want to do 2 things to this information:
- Plot these location on a mapping service (such as Google Map)
- Allow users to search by location (e.g. find all users that live in or are in a certain radius from XYZ city)
The question I have is this: what is the best way for me to implement such features?
My concern is that my database of location information may or may not be in sync with the mapping service I use.
For example, say I have a list of cities and a user picks XYZ city from my list. Later, it turns out that city is not recognized by the mapping service. No way to plot the location on the map (but I could still provide the search by location feature).
If I try to use the database of the mapping service (if I can get a hold of something like that), I may end up being "locked in" to using that mapping service. Plus, these databases tend to be HUGE (and probably too much information for a simple application like mine).
Any recommendations on how to go about solving this problem? Thanks.