I have a database of Cities my application supports. This includes following:
- Name.
- Center coordinates.
Nearest cities my app support are pretty far away.
Algorithm I want to implement is:
- Get current location
- Run through center coordinates, if anything is in <(X)Km from the user, then user is in that city.
Is this algorithm OK or should I re-think it some other way? My app currently supports 3 cities, however I plan to escalate & support more in some time.
Unfortunately, my main audience is abroad public, so internet access is kind of limited, e.g. I would implement an algorithm to determine my city name from internet using standard mechanic, but I can't relay on it as a default algorithm.
See Question&Answers more detail:os