let queryBounds = GFUtils.queryBounds(forLocation: center, withRadius: radiusInKilometers)
Meaning that the radius is measured in Kilometers.
I have ran some tests:
I created a document in Firebase Firestore with a locationHash of my current location
I ran a query against my current location:
let queryBounds = GFUtils.queryBounds(forLocation: currentLocation.coordinate, withRadius: radius)
let queries = queryBounds.compactMap { bound -> Query? in
store
.collection("dummy-documents")
.order(by: "locationHash")
.start(at: [bound.startValue])
.end(at: [bound.endValue])
}
When the radius is set to a value below 10, no document is returned. To factor out GPS-precision being low (because I am inside a house), I ran multiple tests with slightly different currentLocations (all within ~10 Meters of my current real location)
Only once the radius is set to 10, the document showed up.
I then added another document with a locationHash about 140 Meters away.
This document does not get returned with radius = 10 (even though 140m < 10km)
It seems to that the radius is actually measured in meters and not in Kilometers as specified.
The official Firebase documentation states
Meaning that the radius is measured in Kilometers. I have ran some tests: