0

I am using Geofire and Firebase to store users location and get nearby users. However, when I use geoQuery.on("key_entered", ... to get the users close by, I would like to lazy load this data. i.e. get the first 10 results, then get the next 10 results etc.

I am not sure how to do this as I don't see a way via Geofire's documentation. Can anyone assist me with achieving this?

Thanks

AppFirl
  • 165
  • 2
  • 15

1 Answers1

0

There is no way to limit the keys based on the number returned.

If you want fewer keys to be returned you will have to use a smaller distance in the query.

If you want to only process the first 10 keys, you can keep a counter and stop processing after you've handled 10.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807