We've built a map view which displays a marker for each member registered on the website, using their respective location.
We also have a search function which allows visitors to search for members of the website by location. This location search is powered by the Google Maps API via the Toolset integration.
At the moment, we're using a search filter which includes a member in the location results if they're within a certain radius (currently 15 miles) of the centre of the searched location on a map.
However, we've realised that this method is only appropriate when searching for a relatively small town or city for example, where the 15 mile radius is roughly appropriate for that search area.
It's not suitable for larger areas such as "Scotland" for example, which are much larger than the 15 mile radius.
On the other hand, if we change the radius setting to something much larger such as 100 miles, then this would also negatively impact the results when searching for people only in a smaller, more specific area such as a town - there would be lots of irrelevant results for people who are much further away.
As an example, there are several members who are in Glasgow, a city in Scotland. The search works well if someone searches for "Glasgow" and it returns relevant results. However if they search for "Scotland", the search returns zero results, as there aren't any members who happen to be based within a 15 mile radius of the centre of Scotland on a map. It doesn't recognise that Glasgow is within Scotland, and that there are therefore lots of members who should logically show up in the results.
When using Google Maps itself, their search is of course 'smart' enough to recognise the exact borders of large areas such Scotland and Glasgow, and adjusts the boundaries / size of the resulting map on their results page accordingly. But we're unclear whether there's a way to make use of this same 'smart' location functionality when using the Google Maps API and Toolset to run the search.
Is there a way for us to reconfigure our search in some way, so that (as an example) any members based in Glasgow will also show up when searching a larger area such as "Scotland" too, rather than us having to use an awkward "fixed radius from the centre" type of setting, which isn't suitable for small and large locations simultaneously?