Searches by geolocation
Searches by geolocation
We are utilizing Datatables quite extensively. We have been tasked with doing geolocation searches for customers in a 50 mile radius. I was wondering if anyone had done anything like that before? We could store Latitude and Longitude, and potentially utilize an algorithm that determines if one location is within the radius of another, but is there anyway that it could be done in a fast search? I am fairly well versed in PHP more so than Java, if that makes a difference.
Thanks ahead of time for your time
Replies
One option is to use the server to perform the search. Use
ajax.data
as a function to send the search term(s) to the server. When the user performs the search usajax.relload()
to fetch the filtered data.Another option is to have all the rows at the client and use
search.fixed()
orcolumn().search.fixed()
to search the Datable based on the search term(s). See this example. You will need to add the logic to handle the 50 mile radius search.Kevin