Tagged: buddypress location based search
Welcome to BuddyDev Forum. Please explain me bit more. Tell me what exactly you want.
1. Will it be a simple text based search to find the members under a particular location. If Yes it can be done easily.
2. Will it be a search based on location such as geo location to find out the member with in the certain range. If yes then it would be a strategical job and will take time.
Please let me know. What exactly your requirement is?.
In that case please think about this:-
1. How do you want to collect user location data?
2. Do you want to store the location as lat/lang pair or as spatial data type. MySQL dos have support for basic gis functionality/spatial data types, so you should create a new table and store user/point combination there. The Point is spatial data type and you will be storing WKT here.
3. If you have used the data type point, you may use spatial functions ST_DWithin/ST_Distance to accomplish your task.
If you are not comfortable with GIS data, you may store the user location as latitude/longitude pair. This tutorial (It is old when mysql had no support for spatial data types), by Google should help
All the best
You must be logged in to reply to this topic.