MichaelSolati / geofirestore-js

Location-based querying and filtering using Firebase Firestore.

Home Page:https://geofirestore.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Geoqueries with additional queries?

rendomnet opened this issue · comments

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?

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

@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.

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