I have a Geopoint relation in one of my tables called “location”. I have two entries in my table
Entry one: Geopoint(lat:380570515,long:23.7510352)
Entry two: Geopoint(lat:38.0178988,long:23.7166265)
Those two points are about 2km apart, when I look them up on a map.
But when I run the distance function like so
distance( 38.0570515, 23.7510352,location.latitude,location.longitude) <= ft(100)
I get both results, while I should get only one. It seems something is wrong in the distance function, or I am doing something wrong when calling it. I have tried both in android code via api calls, and on web console and the result is the same.
Please let me know how I can resolve this issue.
Regards,
George
Hi George,
This has been assigned to a developer for further investigation.
Regards,
Mark
Hi, George. Distance function works fine. I get only one result, when I use your where clause:
distance( 38.0570515, 23.7510352,location.latitude,location.longitude) <= ft(100)
To be more specific, the distance between your points is 5.3 km (if checked in google maps).
If I specify:
distance( 38.0570515, 23.7510352,location.latitude,location.longitude) <= km(5.31)
I get 2 results, but if I specify:
distance( 38.0570515, 23.7510352,location.latitude,location.longitude) <= km(5.29)
I get only one result.
I just tried it right now, and it looks like its working. I can’t figure out why it was not working before.
You can mark this as not a problem.Sorry for the inconvenience.
Regards,
George