I have one application. In this I am making query for location data. Below is my code and firebase structure. But I am getting data null. Please let me know if I am doing anything wrong.
GeoFirePoint center = geo.point(latitude: 28.535517, longitude: 77.391029);
stream = radius.switchMap((rad) {
var collectionReference = _firestore.collection('Salons');
return geo.collection(collectionRef: collectionReference).within(
center: center,
radius: rad,
field: 'position',
strictMode: true);
});
When I decode geohash abc66ghh
with http://geohash.co/ , it shows location 49.63150978, 170.63432693, a location in the Bering Sea.
When I encode latitude: 28.535517, longitude: 77.391029 with https://www.movable-type.co.uk/scripts/geohash.html , it shows geohash ttp43
and a location in Northern India.
I'm not sure what range you are searching, but it seems unlikely that these places are close enough to match it. Given the position
field in the screenshot you shared, it seems that something is going wrong in the encoding of the geohash.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.