Basically I send a GET request to a php
file with the user lat and long values ($userLat, $userLong
respectively).
In my database, I have a table 'Locations' that has the following columns:
- Location_Name
- Lat
- Lng
- Radius (in meters)
So, I wanna make a query where I compare the user's coordinates with all the Locations coordinates and see if the distance between the Location and the User is <= the radius of that location. If so, return the name of that Location.
The query would be something like this (pseudo-code):
SELECT Location_Name FROM Locations WHERE distanceBetween(($userLat, $userLong) AND (Lat, Lng)) <= Radius