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 ???
Dim Location1, Location2 As Location
Location1.Initialize2(From.Latitude, From.Longitude)
Location2.Initialize2(To.Latitude, To.Longitude)
Dim Distance As Int = Location1.DistanceTo(Location2)