In all, Brilliant Directories has five location types that you can set to either "bounds" or "radius". But what are Bounds and Radius Location Searches.
What are Bounds and Radius searches?
There are 5 different types of locations that can be searched for on your site (with alternate name used in some countries in parenthesis):
- States (provinces)
- Cities (towns, suburbs, etc)
- Zip Codes (post codes / postal codes)
As the Administrator of a site, you can choose what kind of search is done for each of these types of locations - a "Bounds" search or a "Radius" search. By default, zip codes and cities use a "Radius" search, and counties, states, and countries use a "Bounds" search.
A radius search means that the system will get the latitude/longitude of the center of the searched location, and then return all members within a 50 mile radius of that point (50 miles is the default search radius set for these types of searches, but this can be modified in the Advanced Settings of a site).
A bounds search returns all of the members within a square area that contains the entirety of a searched location. This is how searches for a county, state, or country are set to be searched by default.
For example, if I do a search for the zip code "90210" using a radius search, the system will grab the latitude and longitude of the center of that zip code and return all members within a 50 mile radius of that point.
If I do a search for the zip code "90210" using a bounds search, it will return all of the members within the bounds of that zip code, along with any members that are outside the zip code but inside the square that contains the zip code. You can use this tool to get a better idea of what area is being selected when a user performs of search of this type:http://www.mapdevelopers.com/geocode_bounding_box.php
Smart default settings
As mentioned above, a bounds search will "return all of the members within the bounds of that zip code, along with any members that are outside the zip code but inside the square that contains the zip code".
However, with the recommended default settings of "Bounds" for countries, states, and counties, the system is smart enough to exclude any members that are outside the searched location, even if they are contained within the box that contains the searched location.
For example, if I search for "Los Angeles County", the system will only return results that are inside of Los Angeles County, even if there are members that are outside of Los Angeles County, but inside the box that contains it.
Showing the distance from a searched location to each listing in search results
As mentioned above, radius searches will return everything within a radius from a fixed point, typically the center of a city or zip code. Since the system can calculate the distance of each member from this fixed point, it can display information about how far away each member is from that point.
For example, this is a search result for the zip code "90210":
As you can see, there is a distance displayed, which is the distance this listing is from the center of the location "90210"
However, if you choose to use a bounds search for zip codes and cities, there will be no distance information returned ("2.1 mi away" for example), because there is no point to calculate this from - it is simply returning the results inside of the bounds of the searched area.
Editing the Bounds and Radius settings for each type of location search
To change the settings of any type of locations search, please follow theses steps:
- Login to the Admin area of your site
- Go to Settings -> Advanced Settings and search for "bounds"
- This will return all of the location type search settings:
A brief explanation of each:
- "Neighborhood" searches are very rarely used and we would recommend not modifying this setting
- "Zip / Postal Code" searches are for Zip Codes
- "Locality" searches are for cities
- "Administrative Area Level 2" searches are for counties
- "Administrative Area Level 1" searches are for States
- There is no setting for countries, these are always treated as bounds searches
It is important to understand that although only five settings appear in the admin, there are 24 total location types that are controlled by these five primary settings and all based on the Google Location response. The parent settings are:
"Neighborhood" searches are very rarely used and we would recommend not modifying this setting
"Zip / Postal Code" searches are for Zip Codes
"Locality" searches are for cities
"Administrative Area Level 2" searches are for counties
"Administrative Area Level 1" searches are for States
The following chart shows the additional google location types and which primary setting they are tied to. This means if the URL of my search result indicates it is proving a result for location type "sublocality_level3", I would need to edit the "Locality" setting.