Distanceto

JTmartins

Active Member
Licensed User
Longtime User
Hello guys,

Why am I getting values such as 7.1219963E-9 when using the DistanceTo function ?

I've tryed so many ways, read all the forum posts I found and always get this values !!!!

I have lats and longs for both points in a DB stored in format as this example :

point 1 : Latitude : 51.827975 Longitude 10.7910733333333
Point 2 : Latitude : 51.8276666666667 Longitude : 10.7919216666667

I've tryed with this coordinates or converting them to minutes, always getting the same result...

I'm getting nanometers ?????:sign0060:

Help...:sign0163:

Thanks
 

JTmartins

Active Member
Licensed User
Longtime User
Solved

Thanks Erel,

I had latitude and Longitude as double...Changed to String and it worked.

I thought this would be automatic.

Regards,

Jose
 
Upvote 0

JTmartins

Active Member
Licensed User
Longtime User
I believe in you

I believe in you, and I've read that B4A type casting is automatic, and never had problems before. Only with DistanceTo

But the truth is that when I change to double...it gives me strange numbers, and when changed to strings works properly.

Never mind for now. It works. If I have problems with this, I'll come back here.

Thanks
 
Upvote 0
Top