Hello,
My AppId is 6BBA55A8-087F-EBA2-FF1B-596EB5335600
I followed the api documentation about the search by distance. I have implemented this search by distance query for mu class Event:
val distanceQuery ="distance(${providerCoordinates.latitude}, ${providerCoordinates.longitude}, location.latitude, location.longitude) < km($maxDistance)"
Sorry for misleading you. Letās i clarify the situation.
Only the GeoPoint service was marked as deprecated, because we had been removing it (at that time, 3 years ago). It became possible to use this function Distance both with old set of parameters and with new data types (Point, LineString, Polygon). It was made for compatibility.
After the finishing the remove process only one set of parameters was left for Distance.
Conclusion:
So, the correct behavior for different SRS is provided by Distance function and only it. It also checks the input parameters for correctness according to chosen SRS.
distanceOnSphere is a simple geometric function which return the arc length on the sphere surface.
ok in this case, to be clear, the method I sent you is indeed with data from a location column that takes POINT(longitude latitude) as parameters. So why doesnāt it work? I used a new method (POINT) with the old parameters of Distance.
@Volodymyr_Ialovyi I have this error
{
ācodeā: 1017,
āmessageā: āWhere clause ādist<km(1000) AND property=distance( āPOINT(5.8974394 49.5189477)ā, location) as dist AND sortBy=dist ascā is invalidā,
āerrorDataā: {}
}
and same with this
{
ācodeā: 1017,
āmessageā: āWhere clause ādist<km(1000) &property=distance( āPOINT(5.8974394 49.5189477)ā, location) as dist&sortBy=dist ascā is invalidā,
āerrorDataā: {}
}