Knowledge Base - Advanced Features Guide

Using the different radius search methods

Introduction - what is a radius ?

First of all let’s understand how he radius works. Imagine that you have a compass and some pins disposed on a map. Select a fixed point on the map and draw a circle. Some pins will be inside the circle. Others pins will be positioned outside of it. How we intend to choose the pins by circle drawn on the map is the way how the radius works. Using the radius we will filtering the pins automatically.


The radius use two parameters. The "radius" and the "fixed center point" from where the circle is drawing.

Radius and Geocode Factory

In Geocode Factory there is multiple method to use the radius. This radius is defined in the backend by the admin, and cannot be changed by frontend user.

Markerset radius

In the markerset editor you can enter a numeric radius value, the unit (kilometer, miles, nautical mile), and the center point. As center point you can use one of the following methods.

Registered user

This will set the radius center on the current registered connected user. We speak about the coordinates saved in his profile, and not the browser position.

The radius center will be different for each user. Of course user need to have coordinates. Very useful for member only maps.

Note 1 : the cache option can not be used here.

Note 2 : this will only work if the user is logged.


Map center point

This will set the radius center at the map center point defined in map editor. The radius will always start here.


Useful if you create city map, or such. This radius method will only load the markers on a fixed radius set on the backend. There is a sample, the radius center points is located on Cincinnati USA (lat:39 ,lng:-84), and the radius at 500mi, then only the markers in this radius will be loaded and interact with further user action.


As you can see there is only users in a 500mi radius around the fixed point. Now if the user will interact with the markers (sidelist, filtering, front end radius, ...), it will only take effect on the loaded markers.


Note : the radius circle isn't drawn here, but is a setting.

Current entry / profile

This option set the radius center on the current detailed view or current profile. This option is usable only if the map is loaded trough the module, because is need to be used in detailed view or profile view of an third party component.

Note 1 : the difference between "Registered user" and "Current entry/profile" options is that the first can be used on any maps.

Note 2 : if the markerset's Auto-cat is set to Yes, this feature will not work.

Map radius

Geocode Factory also offers other frontend radius method. Them can be controlled by the user (connected or not).

Radius form

With this method the user interacts on the frontend map markers. The goal is to give a chance to frontend user to enter a custom address, and a radius, and see the result dynamically on the map.

For example a user can type "los ang" int the address input, and Geocode Factory will autocomplete the address in "Los Angeles, USA" in the search form, and the user select a radius value. The result will be :


To implement this frontend radius form you need to edit the map template, in map editor, and add the [radius_form] placeholder, see the Geocode Factory map templates article for more details.

Note : if you have already loaded a markerset with a backend fixed radius, this frontend radius search will only search trough loaded markers.

Mouse click

With this method the user interacts on the frontend map markers. When the user clicks on the map the current default radius value is used, and the map is shown dynamically the resulting markers on the map.

For example a user can select a 50mi radius and pick a point on center of the Puerto Rico Island to see how many markers are in this area :


In this sample we used the "Draw circle" option to see a circle that represents the radius.

You can select what mouse button click send the radius draw :


Note : used in conjunction with clustering, it can disappoint users, because some user want click on cluters icon to zoom

User's browser position

You can load your map centered on the user's position (based on browser position). For this simply apply the following option. By default it use the first value of the radius selector values entered in backend in 'Distances list' setting (comas separated values), even if the radius form is not present in frontend. If the radius form is present in frontend, the used radius value is the current selected into the radius dropdown list.


Note : this option require that the user allows the privacy rule to be geocoded. When page is loaded, a message appears, and ask the user to share hes position.

Url defined

As administrator, you can also use 2 url variables to define a map center, and radius : gf_mod_search for the centerpoint, and gf_mod_radius for the radius value. In this sample, we ask the city of Bern (Switzerland), and a radius of 10km. Then simply add this to the url (of course the page need to have a published map) : ?gf_mod_search=bern,switzerland&gf_mod_radius=10.

Note : you can also use coordinates : ?gf_mod_search=447.355,5.234&gf_mod_radius=10.



To use this feature, you need to include the radius form placeholder [radius_form] into the map template. See the Geocode Factory map templates article for more details.

This option will allow you to generate advanced configuration, or creation of custom extensions that can call a map. As example see bellow the "Data form module".

Data form module

To use this method, you need to install and configure the "Data form module". This module allows you to use a radius form (address and radius select) in any module position and on any page of your website (even if the Geocode Factory map isn't visible). After user have entered an address (or zip or other), the map will be loaded with the radius search result.

See the module chapter in the getting started guide. To use this feature, you need to include one of the 2 radius form placeholders, see above.

You can see a working sample of this module in the demo section > sites using Geocode Factory.

Third party plugins

There is also 2 others method to use the radius search on a map. They are based on optional commercial plugins :

  • Sobipro map search : allow to display the Sobipro search results on a Geocode Factory map. Please check the related detailed configuration article. In some words, publish a Geocode Factory map on the search form page with one of the radius form placeholder (see above), and publish a Sobipro markerset on this map. The search results will be displayed. Note : it's compatible with our Sobipro Radius Search application.
  • Community Builder map search : allow to display the Community Builder search results on a Geocode Factory map. Please check the related detailed configuration article. In some words, publish a Geocode Factory map on the search form page with one of the radius form placeholder (see above), and publish a CB markerset on this map. The search results will be displayed.

Showing distances from center

When you use the radius, it will be useful to know the distance of each marker from the center. There is 2 solutions to see this distance. The displayed unit (km/mi) depends the unit defined in map manager. If you use the frontend radius option, you need the placeholder [radius_form] see above.

Distance in marker bubbles

When you open the marker bubble the distance from center will be displayed. For this simply add the [distance] placeholder in the bubble template. See the advanced bubble design for more information.

Distance in side bars

When you use the [sidebar] in the map template (see the map template), the list is sorted by names (depending the choose title field), and, when the user launch a radius search the list is reloaded (reloaded because the content of list is changed ... regarding the radius), and it will be sorted by distances.

Radius options

There is some more things to understand. Theses options are for all cases.

Draw the circle

The radius searching can be used with or without a circle. This circle is designed automatically. In the map editor, simply set the related option to Yes.

Center on the resulting radius

To have the map automaticaly centerd on the radius (even if the radius is changed by the user in frontend), simply set the center map option (in map editor) to the "All markers" option.

Applies To

Geocode Factory 3, Geocode Factory 5