We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm running this query, but it only returns the nearby locations when I set the radiusInKm to a very large number (1500).
Anything below that doesn't return anything, even though there are nearby locations.
What could be causing this?
Stream<Either<Exception, Set<location>>> watchlocations( UserGeopoint userPosition, ) { const radiusInKm = 25; final collectionRef = _firestore.locationCollection().withConverter<Either<Exception, location>>( fromFirestore: locationFirestoreHelpers.locationFromFirestore, toFirestore: (_, __) => {}, ); return GeoCollectionReference<Either<Exception, location>>(collectionRef) .subscribeWithin( strictMode: true, center: GeoFirePoint( GeoPoint( userPosition.latitude, userPosition.longitude, ), ), radiusInKm: radiusInKm, field: geo, geopointFrom: (data) => data.fold( (l) => throw Exception('Unexpected error'), (location) => GeoPoint( location.geo.geopoint.latitude, location.geo.geopoint.longitude, ), ), ) .map((snapshot) { return snapshot.isEmpty ? left(Exception()) : right( snapshot .map( (doc) => doc.data()?.fold( (l) => null, (location) => location, ), ) .whereNotNull() .toSet(), ); }); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm running this query, but it only returns the nearby locations when I set the radiusInKm to a very large number (1500).
Anything below that doesn't return anything, even though there are nearby locations.
What could be causing this?
The text was updated successfully, but these errors were encountered: