Change the Search Radius

Overview

When an address is searched in Store Locator, a radius of all nearby stores is displayed. The distance around the searched address can be adjusted.

If the radius is increased, it will show a larger area so more nearby stores will appear.

If the radius is decreased, it will show a smaller area around the searched address.

To change the search radius, please follow the steps below.

 


 

Set-Up

  1. From within the Store Locator app, select Settings.

    select settings

  2. Select Display Settings.

    select display settings

  3. Copy and paste this code into the Page Footer HTML field: 

    Note: Adjust the script as needed. This code will add a drop-down that displays distances of 1, 2, 5, 10, 25 miles and an option for no limit. The 1 mile option displays by default.

    <script>
    document.querySelectorAll(".search_within_distance select")[0].length = 0;
    var distances = [1, 5, 10, 25, 9999];
    var distance_labels = ["1", "5", "10", "25", "No Limit"];
    var sel = document.querySelectorAll(".search_within_distance select")[0];
    for(var i=0; i<distances.length; i++) {
    var opt = document.createElement("option");
    opt.text = distance_labels[i];
    opt.value = distances[i];
    sel.add(opt);
    }
    </script>

    paste this code in the Page Footer HTML

  4. Select Save
Was this article helpful?
0 out of 2 found this helpful