Empty result when querying "within" on collection
Closed this issue · 1 comments
WieFel commented
Hi, reposting this here (previously posted on geoflutterfire
issues).
I am always getting empty results when querying my collection for close documents within 1km or whatever other distance I choose.
For being sure, I just created a new collection in my firestore called test
, with one document which has some hardcoded coordinates.
In my flutter code, i then query documents in a radius of 1km of that same pair of lat/lon, but I still get an empty result.
Stream<List<DocumentSnapshot>> get closeDocumentsStream {
var radius = 1.0; // [km]
var point = GeoFirePoint(36.723594, -4.4227609);
return geo.collection(collectionRef: firebaseState.test).within(
center: point,
radius: radius,
field: "position",
);
}
(where firebaseState.test
is defined as get test => _firestore.collection("test");
Running Flutter 3.0.2
and Dart 2.17.3
, with package versions geoflutterfire: ^3.0.2
and cloud_firestore: ^3.1.17
.
Any hints on what I could be doing wrong?
WieFel commented