Replies: 10 comments
-
Doing a bit of long due review of the issues here :) Sorry for the lag. What do you mean "otherwise consider it a FR!"? Anyway if the docs says so :) Also if you have a way to do it with multiple requests that would be awesome to share it with us :) |
Beta Was this translation helpful? Give feedback.
-
NP, sorry for being vague. I just meant to propose a feature request that removes the restriction stated in the docs.
I didn't end up implementing this, but my plan was to do something like:
|
Beta Was this translation helpful? Give feedback.
-
So the idea here is to implement a new feature that would aggregate the |
Beta Was this translation helpful? Give feedback.
-
@bobylito Yep! |
Beta Was this translation helpful? Give feedback.
-
Ok thanks, that's really something I want to explore more: the idea of the JS Helper as the gateway to experiment with complex features that we don't want to move to the engine. We'll have to check back with the backend team though :) |
Beta Was this translation helpful? Give feedback.
-
Resurrecting this. Were you able to get to a solution for your issue? I have the same problem here and there still doesn't seem to be a way to achieve it. |
Beta Was this translation helpful? Give feedback.
-
I think this issue is more related to the engine than the helper. Do you want the same behaviour as Tim described? ie Bounding box filtering and aroundLatLng ordering? An option which is possible, but only when the result set is small enough, is to do a query for all the items in the bounding box, and manually sorting them based on the geo location. |
Beta Was this translation helpful? Give feedback.
-
@mathg nope - I decided it wasn't worth making 2 requests as described, and convinced the client the same :) Still would be a nice feature though. |
Beta Was this translation helpful? Give feedback.
-
Although you might lose results from the corners of your box, you can use your bounding box coords to convert to a radius for your search. Increase the radius to include the corners, but then you may have results returned outside the bounding box. Bit of a trade off, but did the job for me. |
Beta Was this translation helpful? Give feedback.
-
This blog post describes how to achieve this by filtering directly on the _geoloc field. Example:
|
Beta Was this translation helpful? Give feedback.
-
The docs state specifically that you can't do this:
Naturally, this is exactly what the client wants :)
I want to filter out results outside of the
boundingBox
, while still ordering closest to my center point.I can imagine possibly achieving this with 2 queries, but that seems wasteful.
If there is any way to pull this off I'd be interested, otherwise consider it a FR!
Beta Was this translation helpful? Give feedback.
All reactions