Question

I am building an iOS app in Corona SDK and am trying to implement a map feature where the user can see where they are compared to where others with the app open are. What would be the best way to go at this?

I already wrote the code for finding the current location of the owner of the device, but how do I retrieve data from other users?

Any advice is greatly appreciated!

Was it helpful?

Solution

This is very broad question, but basically you need a server (on the web) where each user's location gets stored while the app is open, and the app can request the location of other users specifically, at some time interval. Presumably you would need to have some form of rights management since every user would typically be interested in seeing only a small number of other users, and every user would want to have control over who can see their location.

One thing to remind users of is that the reported position is that of the device, not that of the user, and that it is the last reported position, not necessarily current (not all devices are on cellular network or wifi at every moment), so you'd also want a time-of-last-update to be shown with every location marker.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top