Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not getting any Documents from Firestore #42

Closed
sabeaussan opened this issue May 16, 2019 · 4 comments
Closed

Not getting any Documents from Firestore #42

sabeaussan opened this issue May 16, 2019 · 4 comments

Comments

@sabeaussan
Copy link

Hi @DarshanGowda0,

I'm currently trying to implement GeoFlutterFire in an app. I can write without any issue but when trying to get Documents from Firestore it always return an empty list.

Here's my code for getting data :

GeoFirePoint center = db.geoflutterfire.point(latitude : 40.4251669 , longitude : -3.7098554);
var init = Firestore.instance.collection("Tags"); db.geoflutterfire.collection(collectionRef: init).within( strictMode: false, center: center, field: "position", radius: 2, ).listen(_onNewTagsSnapshot);

The call back :

void _onNewTagsSnapshot(List<DocumentSnapshot> snapshot){
print("_onNewTagsSnapshot TRIGGERED *************"+snapshot.toString()); _listTagsControllerSink.add(snapshot); }

which always print an empty list even thought I have 4 documents corresponding to the query.

Here is how the database look like.

screenshot_tag

What Am I missing ? Thanks in advance. Best regards.

@netwiser
Copy link

netwiser commented May 21, 2019

Hi @sabeaussan , what was your solution? I am having a similar issue now, can't get anything out from Firestore.

@TaifRaoof
Copy link

Hi
this problem also appear to me now, so how to solve it ? any help.

@sabeaussan
Copy link
Author

Hi guys,

Sorry for the delay in my answer. My issue was just a typo. I mistakenly added an extra whitespace at the end of the name of the field "position". So in firestore the field was named "position " and in my code I was querying "position" without the extra space so no documents was getting returned.

Don't know if it helps.

Best regards

@TaifRaoof
Copy link

i think when i change the value of geohash to any other random string the document disappear when i make a query so i change the value of geohash to start with "svx" only work for me. so i think this is the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants