distanceOnSphere

Just to confirm does distanceOnSphere return meters ?

I query two location with API even pretty near ( less then 100km on Google map measure ) but it return distance like 4671363 meter


meter

Hello @knight_tan!
Welcome to our community and thank you for trying out Backendless.

Yes, distanceOnSphere returns a value in meters.
A more detailed description of this operator can be found here:
distanceOnSphere Operator

Regards,
Alexander

just to confirm the Point ( lot, lat ) should be in this format right?

getting some weird results when pretty close place also return huge distance point like the screen shot

Yes, that’s right: POINT (longitude latitude)
Here’s a more detailed description: Point

Regards,
Alexander

any good way I can cross-reference the distance point I getting is correct?

I just ran some tests for you and everything is working correctly:

Regards,
Alexander

hi Alex,
really appreciate it, can you share with me what’s service you use on top ( the mapping one )?

Yes, of course, I used https://www.distancefromto.net/

Regards,
Alexander

solved my problem. really appreciated!

1 Like

I’m glad I could help you!
Thank you for contacting us.

Regards,
Alexander