Android Question DistanceTo

iCAB

Well-Known Member
Licensed User
Longtime User
Hi All

Does anyone know if this method takes Altitude into consideration as well?

Thanks
iCAB
 

Roycefer

Well-Known Member
Licensed User
Longtime User
B4X:
Sub DistanceTest
    Dim l1 As Location
    l1.Initialize
    l1.Latitude = 0
    l1.Longitude = 0
    l1.Altitude = 10000
    
    Dim l2 As Location
    l2.Initialize
    l2.Latitude = 0
    l2.Longitude = 0
    l2.Altitude = -10000
    
    Log("l1.DistanceTo(l2): " & l1.DistanceTo(l2))
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…