I want to find all cities within a user specified radius (miles or kilometeres). For eg: find all cities in 200 miles radius from Seattle, WA (must include Canadian cities as well)
If you go to [url removed, login to view], they have a search box with similar functionality. You can find listings from all cities within a user specified radius. You don't have to develop anything fancy like that. All you've to do is find all cities within a user specified radius from a particular city.
**You can create a simple webpage (php) for this. The webpage can have a form and it will accept two fields:
radius (miles or km):
and then it will return a list of cities within that radius.
**You can use MaxMind Free GeoLITE API, I think, if needed.
**NOTES & HINTS**:
1. the calculation should be really fast. Results should appear in under 150 milliseconds. So, posting to an external web service is **out of question**. So, using **webservice** -**NOT OK**.
2. **precalculation** is **Ok**.
3. using **mysql** to store **pre-sorted** and **pre-calculated** list is **OK**.
4. approximation is **OK.** I understand 1 degree latitude roughly equals 70 miles. So, it's **okay** to eliminate out of range latitude/longtitudes.
5. low memory usage (server has very low ram, and if lot of users are hitting the site, the memory usage might become too much).
1) All deliverables will be considered "work made for hire" under U.S. Copyright law. Employer will receive exclusive and complete copyrights to all work purchased. (No 3rd party components unless all copyright ramifications are explained AND AGREED TO by the employer on the site per the worker's Worker Legal Agreement).