- it is slow, this could be executed in a single query instead of 9
- it requires multiple part of the application to be aware of the geohash algorithm used, eg, the server and clients may be written in different languages, geofire libraries used on both sides must have the same algorithm.
- I would also like to keep my models free of Firebases concerns, so that the documents are valid json values (no GeoPoint inside the model or Timestamp).
@frank
The documented solution has the following issues:
- it is slow, this could be executed in a single query instead of 9
- it requires multiple part of the application to be aware of the geohash algorithm used, eg, the server and clients may be written in different languages, geofire libraries used on both sides must have the same algorithm.
- I would also like to keep my models free of Firebases concerns, so that the documents are valid json values (no GeoPoint inside the model or Timestamp).
The API I'd hope for is something like:
collectionRef.within(
radius: 10000,
center: { lat: 40, lon: 50 },
latitudeFieldPath: 'position.latitude',
longitudeFieldPath: 'position.longitude',
)