iOS Question Google Maps Project - Calculating Distances in iOS

RichardN

Well-Known Member
Licensed User
Longtime User
I am translating a Google Maps based B4A project over to B4i. In Android I used the OSM_Droid library to include the Geopoint object calculating the distance between two waypoints thus:

B4X:
Dim DistanceBetween As Long = Geopoint1.GetDistanceTo(Geopoint2)

Is there a convenient method of doing the same thing in B4i ???
 

marcick

Well-Known Member
Licensed User
Longtime User
Yes, Ilocation Library

B4X:
Dim Location1, Location2 As Location
Location1.Initialize2(From.Latitude, From.Longitude)
Location2.Initialize2(To.Latitude, To.Longitude)
Dim  Distance As Int = Location1.DistanceTo(Location2)
 
Upvote 0
Top