Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

only keys with positive longitude are returned if center has positive longitude, same with positive. #148

Open
ChristopheVersieux opened this issue Feb 26, 2019 · 1 comment

Comments

@ChristopheVersieux
Copy link

ChristopheVersieux commented Feb 26, 2019

Hello

I am facing a really weird bug.
I am currently querying some geofire events with Android, and I noticed after some wasted hours of search that the geoquery returned only items with positive longitude, and not the one with negative longitude that is closed.

My code:

//FORCING LONGITUDE FOR TESTING
lastLoc.setLongitude(0.000000001);
//lastLoc.setLongitude(-0.000000001);

                Log.d("CVE", "QUERY at "+lastLoc.getLatitude()+","+lastLoc.getLongitude());
                geoFire.queryAtLocation(new GeoLocation(lastLoc.getLatitude(), lastLoc.getLongitude()), 6000.0d).addGeoQueryEventListener(new GeoQueryEventListener() {
                    @Override
                    public void onKeyEntered(final String key, final GeoLocation location) {
                        i++;
                        Log.e("CVE", i+"");

Notice the forcing at the beginning of the code.

The first case will return 12 items with positive longitude
The second one will return the only one with negative longitude

Here is an example of the data I query:

capture

EDIT, iOS dev has same issue:

2019-02-26 21:55:10.753212+0100 Wakademy[5653:72281] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Not a valid geo location: [92.855914,4.244083]'

Seems related with the point with negative values as we can see below

@ChristopheVersieux
Copy link
Author

ChristopheVersieux commented Feb 26, 2019

Funny thing, it seems that the error comes if I query something greater than 3000 km

I will try to give you an exact value if I have some findings

image

EDIT:

Value is close to 3759
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant