Ordering Geofire results on Distance
<p>I've been experimenting with <a href="https://github.com/firebase/geofire-objc" rel="noreferrer">Geofire for iOS</a> but can't seem to find any way of returning the distance from the search position in a circle query. The GFQueryResultBlock only returns the key and position. Am I right in assuming that I have to calculate the distance myself? </p>

<p>Let's say I am making a nearby restaurant app with Firebase, and want to display the 20 closest restaurants to the user, ordered by how close they are. I could create a circle query and then increase the search radius via a loop until I find 20 restaurants. Then calculate the distance for each one and sort them before displaying them to the user. Is this a reasonable approach, given that a large amount of work is being done in the app to structure the data (calculating distance &amp; sorting)?</p>

<p>I've noticed that javascript Geofire queries <a href="https://github.com/firebase/geofire-js/blob/master/docs/reference.md#geoqueryoneventtype-callback" rel="noreferrer">return distance from the center</a>, but I guess the iOS and android versions are different from this.</p>