Configure WP Store Locator

Go to Store Locator > Settings to configure WP Store Locator.

The different sections on the settings page:

Google Maps API

Google Maps API Settings

Server key A server key allows you to monitor the usage of the Google Maps Geocoding API.

Browser keyA browser key allows you to monitor the usage of the Google Maps JavaScript API.

Google Maps no longer allows requests that doesn’t include API keys and has an active billing account. You can lower your monthly bill by disabling a couple of options that will reduce the number of API calls.

Validate API keys This will test the provided API keys and show whether the Google Geocode API returned the expected data or an error message.

Map language You can set a fixed language for the textual information on the map.

If you leave it empty, the browser’s preferred language setting is used, which is recommended.

If you have a multilingual site and you want to switch the map language dynamically, then you can do this with the wpsl_gmap_api_params filter.

Map region This will bias the geocoding results towards the selected region.

If no region is selected the bias is set to the United States.

Store Search Settings

Enable autocomplete? Enabling this option will add autocomplete support to the search input field.

Enabling this option on a high traffic website may results in a high usage bill from Google. How to set budget alerts is explained here.

Force zipcode only search? Enabling this option will force the Google Geocode API to assume the search input is a zip code. So searching for town / city names won’t work if this option is enabled.

Show the max results dropdown? Enabling this option will show a dropdown that allows users to limit the returned search results.

If this option is left unchecked, the default value from the “max search results” field is used to limit the search results.

Show the search radius dropdown? Enabling this option will show a dropdown that allows users to set the preferred search radius.

If this option is left unchecked, the default value from the “search radius options” field is used to limit the search radius.

Show the category dropdown? Enabling this option will show a dropdown that allows users to filter the search results by category.

Distance unit Use kilometers or miles to calculate the distance between the start point and the store locations.

Max search results The values that are used in the max results dropdown. Each value should be separated with a “,”.

The default value is set between [ ].

Search radius options The values that are used in the search radius dropdown. Each value should be separated with a “,”.

The default value is set between [ ].

Map

Settings Map

Attempt to auto-locate the user When this option is enabled the Geolocation API will try to obtain the user’s current location. If this is successful, the user’s current location is used as the start location on the map.

If the option to auto-locate the user is disabled or fails, then the value from the start point setting is used as the initial start location for the user.
Chrome and Safari no longer support the use of the Geolocation API on connections that don’t use HTTPS.

Load locations on page load If this option is enabled, the store locations are loaded as soon as the page loads.

Number of locations to show Set the number of store locations that are visible on page load.

This option is only visible if the “Load locations on page load” option is enabled.

Start point The default location that is used as the start point on the map.

This is a required field. If this field is left empty the start marker is placed on the equator.

Auto adjust the zoom level to make sure all markers are visible?This runs after a search is made, and makes sure all the returned locations are visible in the viewport.

Initial zoom level The initial zoom level of the map before any store locations are added to the map.

Max auto zoom level After all the locations are added to the map, the zoom level is automatically changed to make sure they are all visible.

This works well if the markers are spread out over a city. If they are placed close to each other and close to the start marker, then there is a big chance the map will zoom down to street level to make it fit on the map. If you’re zoomed in this far, you won’t be able to see much of the area surrounding the store location on the map. To prevent this from happening, you can restrict the maximum zoom level.

If you don’t mind the map occasionally zooming down to level 21 (street level), then set it to 21, but if you want to make sure the user always has an overview of the surrounding area, then a lower zoom level works better.

Max zoom level set to 21

Max zoom level set to 15

This option is also used to restrict the zoom level when the user clicks the “Zoom here” link in the info window.

The “Zoom here” link is only visible if the ‘Show a “zoom to” link in the info window?’ option is enabled.

Show the street view controls? Enabling this option will place the yellow street view icon on the top left corner of the map. You can drag the icon onto the map to switch to street view.

Show the pan controls? This will show a pan control to pan the map in either one direction or another.

Show the map type control? This control lets users toggle between the roadmap and satellite map type.

Enable scroll wheel zooming? Enabling this option allows users to zoom the map in or out with the scroll wheel.

Zoom control position Set the position of the zoom control to the left or right side of the map.

Zoom control style Set the style of the zoom control to small or large.

Map type Select one of the four available map types that you want to use for the map.

  • Roadmap – displays the default road map view
  • Satellite – displays satellite images
  • Hybrid – displays a combination of normal and satellite views
  • Terrain – displays a normal street map based on terrain information

Map style You can create your own custom map style by either writing your own style code, or you can use existing map styles from Snazzy Maps or Map Stylr.

Show credits? This will place a “Search provided by WP Store Locator” text with a link to wpstorelocator.co below the map.

User Experience

User Experience Settings

Store Locator height Set the height of the store locator.

Max width for the info window content Set the maximum allowed width for the info window content.

Search field width Set the width of the search field where users can enter their search query.

Search and radius label width Set the width of the search and radius label in the search bar.

Select store search template Select the template that you want to use for the [wpsl] shortcode.

You can load a custom template with the wpsl_templates filter.

Open links in a new window? If this box is checked, links in the store details will open in a new window.

Show a reset map button? This will place a “Reset” button in the top right corner.

Clicking the “Reset” button will restore the map to how it was when the page first loaded, but only if the viewport was changed.

When a user clicks on “Directions,” open a new window, and show the route on google.com/maps? If this option is enabled, the user is shown the driving directions on google.com/maps. Otherwise, they are shown on the store locator page itself.

Enabling this option on a high traffic website may results in a high usage bill from Google. How to set budget alerts is explained here.

Show a “More info” link in the store listings? This will place a “More info” link in the store listing or info window.

Clicking the link will show the description, phone, fax, email and opening hours.

You can customize the data that is shown after the “More info” link is clicked with the wpsl_more_info_template filter.

Where do you want to show the “More info” details? Select the location where you want to show the “More info” details.

You can choose between showing it in the store listing or the info window.

This option is only visible if the ‘Show a “More info” link in the store listings?’ option is enabled.

Always show the contact details below the address in the search results? Enabling this option will show the phone / fax / email details below the address in the search results.

Make the store name clickable if a store URL exists? When a store URL exist, and this option is enabled, then the store name will link to the provided URL.

If permalinks are enabled, the store name will always link to the store page.

Make the phone number clickable on mobile devices? Enabling this option will make phone numbers clickable on mobile devices.

If street view is available for the current location, then show a “Street view” link in the info window? This will include a “Street view” link in the info window, but only if street view is available for the current location.

Enabling this option can sometimes result in a small delay in the opening of the info window.This happens because the moment a user clicks on the marker, an API request is sent to Google Maps to check if street view is available for the current location. But sometimes there is a small delay before the API returns data, and this will slowdown the opening of the info window.
Enabling this option on a high traffic website may results in a high usage bill from Google. How to set budget alerts is explained here.

Show a “Zoom here” link in the info window? This will add a “Zoom here” link to the info window, enabling users to instantly zoom to the zoom level set under the Max auto zoom level setting.

On page load move the mouse cursor to the search field? Enabling this option will make sure that the mouse cursor is placed in the search field as soon as the page is loaded.

If the store locator is not placed at the top of the page, enabling this feature can result in the page scrolling down.

Use the default style for the info window? If this option is enabled the default info window is used, otherwise the InfoBox library is used.

The InfoBox library makes it easier to change the look and feel of the info window.

You can change the settings for the InfoBox library with the wpsl_infobox_settings filter.

Hide the country in the search results? Enabling this option will hide the country in the search results.

Hide the distance in the search results? Enabling this option will hide the distance in the search results.

If a user hovers over the search results the store marker Select the effect that is applied to the store maker if the user hovers over the store details.

The corresponding store marker will either bounce up and down, open the info window, or not respond at all.

If the marker cluster option is enabled, and the markers are clustered, then this option will not work as expected.

Address format Select the address format that you like to use.

You can add custom address formats with the wpsl_address_formats filter.

Markers

Marker Settings

Start location marker This marker is placed at the start location.

Store location marker This marker is used for the store locations.

Enable marker clusters? When this option is enabled, markers that are close to each other are merged into a single marker.

Enabling this option is recommended for maps with a large amount of markers.

Exclude the start marker from the marker cluster? Enabling this option prevents the start marker from being included in a marker cluster, so it will always show up as a single marker.

Max zoom level If this zoom level is reached or exceeded, all markers are moved out of the marker cluster and shown as individual markers.

This option is only visible if the marker cluster option is enabled.

Cluster size The grid size of a cluster in pixels.

A larger number will result in a lower amount of clusters, and also make the algorithm run faster.

This option is only visible if the marker cluster option is enabled.

Store Editor

Settings store editor

Default country Set the default value for the country field.

Map type for the location preview Select one of the four available map types for the location preview:

  • Roadmap – displays the default road map view
  • Satellite – displays satellite images
  • Hybrid – displays a combination of normal and satellite views
  • Terrain – displays a normal street map based on terrain information

Hide the opening hours? When this option is checked, the opening hours are not shown in the store editor nor on the store pages.

Opening hours input type Set the input type for the opening hours in the store editor to either “Dropdowns” or “Textarea”.

This option is only available for users that upgraded from version 1.x to 2.x. Users who started with version 2.x will only have the option to set the opening hours through dropdowns.

The default opening hours The default opening hours for each store.

Opening hours format Show the default opening hours in the 12 or 24 hr format.

Settings permalink

Enable permalink? If permalinks are enabled, each store location will have its own page.

Remove the front base from the permalink structure? The front base is set on the permalink settings page in the “Custom structure” field.

If a front base is set ( for example /blog/ ), then enabling this option will remove it from the store locator permalinks.

Store Slug The slug used for the store pages. The default is “stores.”

Category Slug The slug used for the store categories. The default is “store-categories.”

This option is only visible if the permalink option is enabled.

The permalink slug must be unique on your site.

Labels

Labels

Change the labels that are used on the store locator pages.

If your site is multilingual and you use WPML, then you should create the different translations on the String Translation page.

Tools

Settings Tools

Enable store locator debug? This disables the WPSL transient cache.

Enable compatibility mode? If this error shows up in the browser console on the store locator page: You have included the Google Maps API multiple times on this page. This may cause unexpected errors, then enabling this option should fix it.

WPSL transients Clears the transient cache that holds the store locations shown on page load.

The transient cache is only used if the Load locations on page load option is enabled.

GDPR – Only load Google Maps after the user agrees to it? This option requires the Borlabs Cookie plugin, and will ask visitors for permission to load Google Maps. The required steps to make this work are explained here

Show the Geocode API response for a location search This will show the searched location on a map based on the current configuration together with the raw Google Geocode API response.