I experimented with Geofire for iOS , but didn't seem to find a way to return the distance from the search position to the query circle. GFQueryResultBlock returns only the key and position. Am I right in assuming that I must calculate the distance myself?
Let's say I'm building a restaurant app nearby with Firebase and want to display the 20 nearest restaurants for users ordered by how close they are. I could create a round query, and then increase the radius of the loop search until I find 20 restaurants. Then calculate the distance for each of them and sort them before displaying them to the user. Is this a reasonable approach, given that the application does a lot of work to structure the data (calculate distance and sort)?
I noticed that the Geofire JavaScript request returns the distance from the center , but I assume that the versions of iOS and android are different from this.
source share