firebase / geofire-objc

GeoFire for Objective-C - Realtime location queries with Firebase
MIT License
437 stars 181 forks source link

Query for radius appears to not be accurate #82

Open reneeOlson opened 7 years ago

reneeOlson commented 7 years ago

Hello. I've been doing queries within a radius where I start at 10 miles and then I increase by increments of 10 miles. What I've noticed is that locations that should be within my radius are coming back in larger radiuses....for example 1 location within 14.3 mi and another within 17 miles are not getting returned at the 20 mile radius, but instead at the 30 mile. And 1 location within 25.2 miles and another within 28.5 are not getting returned until the 50 mile radius instead of expected 30 mile radius. I verified the distance from my location at two websites that calculate distance between coordinates. Has anyone noticed this?

alexanderkhitev commented 7 years ago

Hello @reneeOlson! I faced the same problem

reneeOlson commented 7 years ago

Hi @alexsanderkhitev. Thanks for responding. So it is a real issue then. I wonder if the Geofire/Firebase team knows about it and if they're working on fixing it.

jglanfield commented 7 years ago

We were having the same issue, but then found we were caching data incorrectly. Make sure you set keepSynced(true) on your database references, and then see if that helps.