Geolocation tracking usage for other users.

Hi all, I am currently working on a mobile application and using the geolocation for the current user logged onto the application. I have the user's longitude and latitude, and that is great but I am not sure how I could utilize this for what I need. What I am trying to achieve is when I get the current user's location, I would like to compare or estimate the user's location to any other users that are on the mobile application database that are close by to this user that is logged on and represent this data in a list view. Therefore, the user can see the other people that are close by his/her location. I am not sure how to approach this because each user only has their city, state, address, and zipcode saved in the database not their longitude or latitude. Any advice on this approach? Thanks
2 answers


If you want to compare the user's location to that what is stored in the database, have a look at the google maps module. Then you can retrieve the lat and long by geocoding requests based on the information available. Then calculate the distance between the user's lat long and those in the database. There's a module for that available in the appstore as well. If you want to compare distance to other logged in users just get their lat and long and store it in the database and then calculate the distance.


Michael, Did you already created mobile versions of your app? Because that you should do first. In the navigation of the phone start with a microflow that retrieves the lat long of the phone (see appstore and store this in the database. You could create some scheduled event that updates these values. Then you can do the calculations as Erwin mentioned.