Closed mszubiczuk closed 4 years ago
So I'm partially able to recreate this issue, and partially unable...
Here is a StackBlitz where I have coordinates of [1, 1], [10, 10], [1, -1], [10, -10], [-1, -1], [-10, -10], [-1, 1], [-10, 10] (2 points for each of the 4 quadrants of a plane) and I'm able to query from [0, 0] and get all 8 of them when the radius is up to 8587 KM. Geoqueries fall apart with a radius greater than 8587 KM.
Keep in mind geohashes aren't a perfect fix for the lack of proper geoqueries in Firestore. I think I need to know what the center and radius are for your query, as well as what geopoints that you'd expect to have returned.
For reference this distance between San Francisco to London is 8611 KM, just outside of the range supported. Mind you, that's a massive space. I give that as a reference as to how much space can be covered by 8587 KM.
Hi, I've been having issues with fetching data with negative coordinates ( South, West ) set for
center
parameter. It works just fine, whencenter
has positive longitude and latitude values. Down below there is a code snippet of how data are being saved in firestore, and also how near query is implemented.This code updates documents correctly and results in geofirestore related fields being added:
Anyway, when longitude and latitude are positive, there are no issues whatsoever.
However, code below returns no results when
lat
orlong
or both are negative. Also, if one or both restaurant coordinates is negative, these documents are not returned even if radius is set to extra large number ( 10000000000000000000 etc. ).