How can I sort of geoPoint by distance?

2 years ago - “(…) this would be very useful”

7 months ago - “We’ll get this fixed in the next hotfix”
6 months ago - “I am escalating the ticket to put it in the priority queue”
3 months ago - “I have increased the priority for ticket 11910. Our engineers will look at it as soon as possible.”
2 weeks ago - “I have requested our developers on the status of the ticket”

Really…?

Yes, really… Priorities change and some issues have to be put on the back burner. If you’re not new to software development, you know it can be. The good news is 11910 has been fixed and is included into the upcoming rollout (should go out next week).

Is this fix is rolled out in the sdk?

Hi, any news on this subject?

is it?

Thanks

This issue has been fixed on the server-side.

Regards,
Mark

mmmm it’s not working for me.
I get first far away objects…

This is my query

query.whereClause = “distance( 41.39032416998498,2.158678314632413 , location.latitude , location.longitude) < km(100)”

How can I sort ASC instead of DESC?
query.queryOptions.sortBy = new Array(“location ASC”);?? Doesn’t work…
Thanks.

Same problem, still not working! :frowning:

Can we get an example ?

Olivier, what is not working? Please provide more details.

I get first far away objects…

This is my query

query.whereClause = “distance( 41.39032416998498,2.158678314632413 , location.latitude , location.longitude) < km(100)”

How can I sort ASC instead of DESC?
query.queryOptions.sortBy = new Array(“location ASC”);?? Doesn’t work…

Can we get an example ?
Thanks.

@Mark

My details are the same as Roberto.
Is there another way to sort by distance ASC

Hi, Mark.

Have you seen Oliver’s and I messages?
Thanks…

Hi Roberto and Olivier,

Currently there is no way to change the sorting order with the query. As a workaround, you can do it on the client-side or simply process the returned collection in the reversed order.

Regards,
Mark

Hi Mark, this doesn’t sound like a workaround if you load data page by page.

It will work if you loads the pages in the reversed order as well… I agree, it sounds silly (although totally doable).

This will work properly in Backendless 4.

Regards,
Mark

Hello, is this feature working in Backendless 4? Just want to be sure.

Yes, it should be working properly. Please let us know if you see a different behavior.

Ok, thanks! I will check and let you know.

Hello, is this feature working, because I am deffinitly not getting the closest geo first

Hi @snakeeyes!

The old Geolocation is no longer supported and will be removed in one of next releases.
I strictly recommend you to switch to the new Geo. (https://backendless.com/docs/rest/data_spatial_overview.html)

Or you get wrong behavior with new Geo?

Regards, Andriy