I have a table which has a POINT
column containing the latitude and longitude of various locations.
I then also have a users location from geo-location in the browser.
What I need to be able to do is find all records from the table where the POINT
value in the is within a 10 km radius (or X km radius), ordered by distance with the closest first.
My table has a SPATIAL
index on the POINT
column.