MichaelSolati / geofirestore-js

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

Geoqueries with additional queries? #211

Closed rendomnet closed 3 years ago

rendomnet commented 3 years ago

How can we make geo queries with additional arguments such as sorting and filtering? Without this functionality is there any serious use cases of geofirestore-js?

MichaelSolati commented 3 years ago

Can you give an example of a firestore query that you would like to be able to do with geofirestore?

rendomnet commented 3 years ago

@MichaelSolati just simple filtering get nearby geopoints of 'shops' with category 'medical' and type 'private' and status 'open' for example.

I understand that geofirestore is at least something instead of nothing. But I think it is doing more harm to firebase than good. It is filling the vacuum that may be filled with proper official solution. But right now even firebase documentation pointing to this library.

MichaelSolati commented 3 years ago

Ok, so what i mean to say, virtually any firestore query works with geofirestore. So if you had collection.where('type', '==', 'medical') you could do geocollection.near(/** args here */).where('type', '==', 'medical') that should work as well. This lib exposes most of firestores methods, so you shouldn't have any issues making a more filtered query. I'd check the docs for a geocollectionref => https://geofirestore.com/classes/geocollectionreference.geocollectionreference-1.html