|
|
|
Ask HN: Could any iOS Developer Give me some pointers?
|
|
2 points
by markcrazyhorse
4183 days ago
|
|
I'm quite new to iOS Development and wanna get stuck right in :) I'm just looking to find the best practice for this: I know I can use CLLocationManager to get the users location but I want to create an app that does this: User logs in > app checks web server for online users in specified radius in miles/feet of the current users phone > displays users. What is the best way to go around this? much appreciated for all your help. |
|
Having said that most databases (on the backend) have spatial extension where you can run queries like 'where inside(point,geometry)'. So you create a bounding box or circle around the user, then run a query. That's faster than calculating distances between all users. The databases have special indices for geographic lookup. Both point and geometry probably need to be specified in WKT format. http://www.gaia-gis.it/spatialite-2.1/SpatiaLite-manual.html http://docs.mongodb.org/manual/applications/geospatial-index...