You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, the above venue should not be listed, as it is not in range of 4 km from origin, but actually it is listed. I've tried to narrow the distance to see at what point this venue will not be listed, and I got to:
I am trying to find objects in range of 4 kms, so I am using this example in docs:
in my case it will be:
venues = Venue.within(4, units: :kms, origin: [44.1133355, -79.376071])
Also, to make sure it shows proper results, I am using this route as reference:
https://www.google.com/maps/dir/44.088102,-79.3346276/19619+McCowan+Rd,+Mount+Albert,+ON+L0G+1M0,+Canada/@44.1132739,-79.3760709,13z/data=!3m1!4b1!4m8!4m7!1m0!1m5!1m1!1s0x89d534903b40df85:0x3a15c399937141ab!2m2!1d-79.3473307!2d44.1384912
it shows 5.7 km from origin to destination.
Now, the above venue should not be listed, as it is not in range of 4 km from origin, but actually it is listed. I've tried to narrow the distance to see at what point this venue will not be listed, and I got to:
Now, 3.6 miles to kms = 5.79364... and venue is not listed. This makes me think that
within
method ignores theunits
option and uses miles as units.My setup:
Thank you.
The text was updated successfully, but these errors were encountered: