MichaelSolati / geofirestore-js

Location-based querying and filtering using Firebase Firestore.
https://geofirestore.com
MIT License
505 stars 58 forks source link

I am using geofirestore #57

Closed snownoop closed 5 years ago

snownoop commented 5 years ago

I am using geofirestore, that awesome. But have question. In my app i have doc with some key-values and i need to store location for each of them.

if i am using geoFirestore.query({...}); with center and radius. Then inside key-entered i got key, doc and distance. however as doc i got everything that stored under d key. But all my other data is stored directly inside doc, on same level as d

So i need to perform one more request to get all other data which is not very good. Do geofirestore can give an ability to get all doc data by geoquery with center and radius ?

Thanks.

MichaelSolati commented 5 years ago

Geofirestore is intended to wrap the document, so you shouldn't be trying to store details on the same level as d.. That's where geofirestore works. I'd suggest reworking your data to fit the structure geofirestore uses.