-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not a valid geo location for a huge radius #64
Comments
Hey @zgosalvez, I had the same type of thing happen where I had to query a large radius, and what I ended up doing was using the |
+1 |
I'm hitting the same issues here in Ireland. The iOS app reviewers in Cupertino, CA are unable to view my locations and are failing the app review. I'm trying to set the radius to global but hitting the same precision error @zgosalvez hit. I need a quick fix before the reviews close for christmas, did you make any progress @zgosalvez , the GFRegionQuery @JPROFFICIAL suggested seems suitable for use with a map, but I'm only using the user's current location. |
@ahaverty Sorry for not getting back to you sooner. This is the only time I got to go back to my project. I used region query instead of radius. This gives a bigger section of the globe without extending beyond acceptable values. The only drawback is that it still isn't the entire globe. let span = MKCoordinateSpanMake(90 - userCurrentLocation.coordinate.latitude, 180 - userCurrentLocation.coordinate.longitude)
let region = MKCoordinateRegionMake(userCurrentLocation.coordinate, span)
regionQuery = geoFire!.query(with: region) |
@ahaverty did found a solution ? |
Thanks @zgosalvez ! That's progress |
This is a breaking feature for one of my apps. Thanks for the span idea though. |
Anyone found a solution on IOS for this, where the entire world is covered? |
Any updates on this? When I run this code:
I get the error
I want to be able to query a region of 10,000 m around a user. The fix above using |
@farzaa
hope this helps. |
+FratGodLordOfBeer Hey...so this keeps the radius as 10000 units even though you're dividing rad by 1000? that is odd. |
Follow this guy's answer to get convert your miles to meters
For eg. if the user choose 30 miles
Use Basically set the region
For a more detailed answer Here's my SO question and answer |
@zgosalvez @LanceSamaria @Primate92587 @FratGodLordOfBeer @farzaa Any solution for this other than limiting the radius? |
@vaibhav-jhaveri-ds, the team decided to switch queries to Algolia, which allows for more complex queries on top of geo location. |
@zgosalvez Which product do you use in place of GeoFire? |
@vaibhav-jhaveri-ds, check out Algolia's Search API. More here: https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#geo-search |
@morganchen12 Will there be any solution for this particular issue? |
any update on this? |
I'm making a global app that requires schools to be sorted from nearest to farthest, based on the user's location. To do this, I set geoFire.queryAtLocation(location, withRadius: 40075)
This causes a precision error (
'Precision must be less than 23!'
) which I don't understand. So I reduced the radius to 4000. This time I'm getting a'Not a valid geo location: [100.062421,-21.955856]'
error. I hard coded the user's location to be somewhere in IcelandCLLocation(latitude: 63.8875517, longitude: -21.9558564)
It seems that this error shows up when the radius hits one of the poles, in this case the north pole, since I don't get the same error when I change the user's location to somewhere nearer the equator.
The text was updated successfully, but these errors were encountered: