1

I have some Locations in my database include the (Longitude,Latitude) of every location I would like to display in listview for user, the distance between the user and the Locations

how can I do it ?

my Idea at the moment, i want to save the long and lat of User at run time into database, when calls the activity of adresses

the php scrypt should calculate the distance betwenn the user point and the adresses

or is there any other solution ?show my tables here

at the moment, i can display on the Listview the coordinate of locations only, and now I would like to display the distance

Testiest
  • 39
  • 1
  • 6

1 Answers1

1

Look into the Vincenty formula. Use the Inverse formula to calculate the distance between two points on the surface of an ellipsoid. Earth's surface is more ellipsoidal than spherical or planar.

geneSummons
  • 907
  • 5
  • 15