0

I need to query my collection to find the records in an area.

Currently, I've got my map view boundaries in a JSON object:

{
    "minLng": -123.12382489442824,
    "minLat": 49.27978719725107,
    "maxLng": -123.11826568096875,
    "maxLat": 49.28467300126758
}

And I need to filter documents with locations that are inside this area. Is it possible with Firestore in react-native?

In a simple statement, fetching records in an area.

Vahid Alimohamadi
  • 4,900
  • 2
  • 22
  • 37
  • Searching within a specific geographic area is not built in to Firestore, but there's an add on solution using geohashes, which is explained here: https://firebase.google.com/docs/firestore/solutions/geoqueries. I linked a few questions that share more details, but nowadays I'd recommend starting with the documented solution – Frank van Puffelen Dec 10 '22 at 17:03

0 Answers0