Posted on

Name Search Issues and How Immediate Mode Affects Results

Store Locator Plus has two basic modes that are used to render locations on a map.   The first mode is “Immediate Mode”.   This search mode is employed when a site elects to turn on the Immediately Show Locations selection.   The other mode is “Form Search Mode” which occurs when a user interacts with the locator on your site and submits a search.

Immediately Show Locations Setting
Immediately Show Locations Setting

For this discussion I will refer to a case I am working on for SottoPelle Therapy as it provides a point of reference that will help describe the issue at hand.

Name Search Inconsistency

The issue SottoPelle is having is that searching for a location by name produces different results when the map first appears than it does on subsequent searches.   This issue needs to be addressed and I will work on crafting a solution.  In the meantime I will describe how the search works today as it is a good use case to describe the inner workings of the product.

Currently the SottoPelle site uses Immediate Mode to display all of their locations when the map initially loads.  When someone searches by name only the locator will display “no results found.   If a user then types in a name and resubmits a list of locations appears.

Initial Search : Immediate Mode

The initial search on the site is set to show all locations within 2500 miles of the default map center.  The map center is not being set by the SottoPelle via the “Center Map At” setting.  As such the application will use the center of the country that is selected under the User Experience / Map / Map Settings which is “United States”.   That location that is the center of the USA, according to Google, is at 37.09024 latitude and -95.712891 longitude.

Center of USA Latitude and Longitude
Center of USA Latitude and Longitude

The search is setup to show all locations within a 2500 mile radius of that location.  This show location throughout the USA and well as some locations in Europe.    After the locations are returned Google will draw a  bounding box around all of the locations and re-center the map.

Immediate Locations Map on SottoPelle
Immediate Locations Map on SottoPelle

The new map center is somewhere in the North Atlantic at 33.96055 latitude and -58.70166 longitude which is a good ways northeast of Bermuda.

Auto-centered Gooogle Map After Search
Auto-centered Gooogle Map After Search

This sets up the initial failure with the name search as described below.

First Search via Search  Form

Now that the map is drawn the first user interaction occurs.   The user enters a name to search for, but not an address.  The way the application works it will search for all locations within Y miles of the current map center if an address is not entered.    Entering the name “Tutera” will search for all places with the name “Tutera” within 2500 miles of the North Atlantic at 33.96055 latitude and -58.70166 longitude.

That yields no results as there are no locations with the name “Tutera” within 2500 miles of the center of the Atlantic.

When a search returns no results the map will display the “No results found” message and reset to the original center location.  In this case the center of the USA which sets up the second search for better results.

Second Search via Search  Form

The second search now starts back from the center of the USA  at 37.09024 latitude and -95.712891 longitude.   With the name field remaining set you can now press Find Locations again and, depending on the name, get a match because there is a location named “Tutera” within 2500 miles of the center of the USA.


Outside of crafting a new option in the plugin to manage the “where to center map after no results found”, other options exist in the current configuration:

– Since the radius is hidden you can ensure to find the most matches by setting the default radius to 10,000 miles.  The current SottoPelle configuration has Immediate Mode set to search 10,000 miles and Form Search to 2,500 miles.  You will likely want to set a maximum results returned in “Form Search Mode”  via “max search results” to a small number such as 10 locations.


– Some sites can use “append to search” and set it to something like “United States” which will cause a name search with no address input to always center in the USA.  That won’t work well for SottoPelle since they do have European addresses and users search for an address in Barcelona likely are not looking for Barcelona USA.

Adding features to the plugin such as a “do not re-center map after search” or “use this address when address on search form is blank” can be added to the product but are not on the current development schedule.  Maybe soon but the impact of these settings needs to be reviewed and tested before going to production.