beerstorm-net / GeoFlutterFire2

🔥GeoFlutterFire2🔥 is an open-source library that allows you to store and query firestore documents based on their geographic location.
https://pub.dev/packages/geoflutterfire2
MIT License
14 stars 40 forks source link

QueryreF geoflutterfire #34

Open hacen27 opened 1 year ago

hacen27 commented 1 year ago

How can I perform a geospatial query using GeoFlutterFire to find nearby locations within a certain radius from a given latitude and longitude? Exemple 👍

var queryRef = _firestore .collection('speedtestlocation2') .where('IPInfo', isNotEqualTo: 'Unknown ISP') .orderBy('IPInfo') .orderBy('avrg', descending: true);

  var streams = geo.collection(collectionRef: queryRef).within(
      center: center,
      radius: 10,
      field: 'position',
      strictMode:
          true);