Problem:
I am working on a project that requires the user to input a maximum of two zip codes during. When the user is redirected to their dashboard, based on the zip codes provided, the site should list advertisers within the 30 mile radius. Note that if the user decides to change their zip codes later on, somewhere on their profile, the dashboard will show advertisers within the radius of the given zip codes.
Solution:
Implement the advertiser as a node with node location attached to it and create a “Location" type view.
Modules used:
Location – 6.x-3.0
Views - 6.x-2.7
Implementation:
Here are the steps to create the “Location" view, which will do a proximity search, given the user's zip code on their profile:
1) Navigate to "admin/build/views/add".
2) Enter the view name and description.
3) Select “Location" under “View type".
4) Under “Fields", select “Location" and add “Location: Distance / Proximity"
NOTE: The distance from the selected location and either the current user or a specific location.