1

I want to fetch the area under 5KM of my latitude and longitude using mysql. I used the following code but it infact stop showing the point at my exact co-ordinates.

and (acos(sin(1.3963) * sin(field_latitude_value) + cos(1.3963) * cos(field_latitude_value) * cos(field_longitude_value - (-0.6981))) * 6371 <= 5)

I got the code after google search. Please assist me if anyone know the clue.

Tushar Sharma
  • 135
  • 3
  • 10
  • Refer this thread http://stackoverflow.com/questions/574691/mysql-great-circle-distance-haversine-formula – Samy Mar 14 '13 at 05:46
  • Latitude and longitude are assumed to be in radians. If you use degrees you have to convert. – Joni Mar 14 '13 at 06:19
  • Thanks for the reply Samy, but I want the latitude and longitute of all the points under 5 KM that are saved in my database so that i can show them in google map. – Tushar Sharma Mar 14 '13 at 12:38

0 Answers0