Changes in the 'distance()' function?

Hello,

I have 2 questions about the distance() function (https://backendless.com/docs/ios/data_search_by_distance.html)

  1. Is it going to be deprecated together with the GeoPoint service after October 5th?
  2. If not, is there a change in how it works?
    I’ve used this example before:
    ‘distance( 42.734848, 23.392855, lastLatitude, lastLongitude ) < signalRadius * 1000’
    for where clause and it used to work (lastLatitude and lastLongitude are columns with double values and signalRadius is a column with int values). Currently it looks like the same where clause returns everything from the table as if there is no where clause at all. Is this expected?

Thanks a lot!

Hello.

New functionality have many difference with old API. You can read more about this here:
https://backendless.com/docs/ios/data_spatial_overview.html
https://backendless.com/docs/ios/data_spatial_retrieval_api.html

If that doesn’t make your situation clear, we can continue our conversation.

Regards, Dima

Hi,

I am familiar with the new functionality and am currently migrating my app to it. The distance() function is not directly related to the GeoPoint service as it works with coordinates. However, the fact that in the docs it is described in the GeoPoint section only and that it seems to not work anymore raises the two concrete questions above.

Best,
Milen

Hello @milen-marinov.

1)Yes, the distance() function is going to be deprecated together with the GeoPoint service after October 5th.

2)Yes, there are changes, described here::
https://backendless.com/docs/ios/data_spatial_retrieval_api.html#distanceonsphere-operator.

Regards, Nikita.

1 Like

Thanks a lot!

@milen-marinov happy coding:)