How Auto-Radius Works

How Auto-Radius Works

One of the most useful features of the BMLT is the “auto-radius” capability. This is where you simply click somewhere on a map, or enter a location, and you are presented with a result that includes the nearest few meetings to that location.

How far afield the search goes to get these meetings is determined programatically. I’ll cover exactly how this is done in this post. It’s a bit technical, but nothing too bad.

First, there are a set of discrete steps that are defined in the /main_server/server/config/ file. The define is an array called “$comdef_map_radius_ranges”. Here is the default one:

These are the steps the calculator uses to determine a suitable radius. These values are different from the ones that appear in the Advanced Search popup menu.

You can override this in You do that by simply redefining it with your own numbers. The BMLT Root Server will choose the one in over

Also, in, there is a setting, called “$number_of_meetings_for_auto”. This defaults to 10. What this says, is “Give me AT LEAST 10 (in this case) meetings nearest the center of the search.” The center of the search is determined by a map click, a coordinate submitted to a semantic search, or an address.

When you do an auto radius, the search starts just at the center, and then goes outward in the steps outlined by the $comdef_map_radius_ranges array. At each step, it looks for the number of returned meetings.

If the number of returned meetings is still less than $number_of_meetings_for_auto, it expands to the next step. This continues outward to the end of the $comdef_map_radius_ranges array.

The actual meeting search radius might be a bit different from the fast one that is used to determine the search (it’s technical), so there might be a slight difference; resulting in fewer meetings than $number_of_meetings_for_auto, but this is rare. It is usually greater than $number_of_meetings_for_auto. Sometimes a lot greater. The radius search chooses the step that gives it $number_of_meetings_for_auto number of meetings OR MORE.

If you have meeting places with large numbers of meetings (like clubhouses), this can result in unusual responses. For example, at 10 Miles, there may be 7 meetings, but at 12 Miles, there might be 50, because a couple of clubhouses were included, and that added a lot more meetings to the search results. The search would stop at the step that finds 50 meetings (12 Miles), even though 7 meetings would probably be more useful than 50.

It is also possible to get extremely wide search radius results. For example, if you have 2 towns that are small, 60 miles apart, and each have 8 meetings within a small area, doing a search on one of the towns will expand to the other town, because neither of the towns has more than 10 meetings.

Let’s look at some examples, using the given simplified default array, in miles:

In the first example, we will set $number_of_meetings_for_auto to 2:

The half-mile step is enough to find 2 meetings, so that’s where the auto-radius stops.

Now, the default ($number_of_meetings_for_auto = 10):

It finds 10 meetings exactly within a 1-mile radius. The red markers indicate places that have more than 1 meeting.

Now, let us set $number_of_meetings_for_auto to 11. Just 1 more than before:

In this case, the next step out is 2 miles, and that returns 24 meetings.