I would like to build a location-aware application that automatically detects a user's location and presents them a sorted list of the nearest landmarks from a landmark database. The application will be built on the iPhone.
The fundamental questions are:
- How to calculate the distances to nearby landmarks and sort by "closest"
- Where to perform the calculations - on an external server via a web service - or on the iPhone itself via an SQLite database and/or Core Location
Ideally, the application would calculate the distances using "routed distance" as opposed to crow-flies distance (i.e. greater circle distance formula), being the more accurate method. Of course with this comes a cost - it will be much slower to calculate. I would like to know what method would be most appropriate.
Also, the advantage of performing the calculations on the phone itself (using Core Location?) is that there is no need for talking to a server (faster) and the app may be used without an internet connection. The disadvantage lies in the difficulty of keeping the landmark database synchronized with the newest data.
I would like to know if there is an industry standard way of implementing a location-aware application such as this. If not, please suggest the best possible solution to the problem.