Solution 1 :
There is a library available at https://github.com/mbramwell1/GeoFire-Android
The location of each document is stored using the following formula (a method is provided by the library itself):
degreeMatch = (latitudeDegrees + 90) * 180 + longitudeDegrees
I did a few tests combining a few operators (including limit and array-contains) and it seems to be returning the correct results.
Problem :
I am currently filtering some data using GeoFirestore for Android. By decreasing the radius, of course it is possible to decrease the number of documents retrieved. However, I would like to further filter the same data using the compound queries functionalities provided by Firestore or simply limit the number of reads using limit()
, in order to 1) avoid downloading/reading documents that are no needed and 2) improve my users’ experience in terms of time and resources.
I know this question has been already asked several times (for example, here). Nevertheless, Firestore is rapidly evolving—for this reason I would like to ask if there are updates regarding this topic.