Locatoraid

WordPress Store Locator Plugin

Map Zoom Levels

Google Maps provides a wide range of zoom levels both for their standalone and embedded maps. With the zoom level of 1 you can overview the whole world while the zoom 22 will show you the closest view on the street level.

Automatic map zoom

By default, Locatoraid goes with the automatic zoom level calculation for its embedded Google maps. After a website visitor entered an address string, the store locator plugin geocodes the string, i.e. it finds the geographical coordinates of that place. Then the plugin searches within the database of the locations to find the records that are situated within a specific radius around this central point of the search query.

Next, as we get the list of matching locations, we should display them on the store locator map. We arrange the results on the map, then we mark them with default or custom map icons. Now, the automatic zoom calculation comes into play. The algorithm adjusts the zoom level of the Google Maps until all the search results become visible within the current map bounds. The final level where the zoom adjustment stops depends on the number of the locations and how close they are to one another. In other words, the density of your locations is also important.

For example, if you don't have that many locations, but they are spread across the country, then the store locator will display the map of the whole country.

Country level for the zoom of the map

For instance, let's search for Wilmington, Delaware. According to our limit and radius shortcode parameters, we can find 10 matching locations. As the results are quite close to one another, we can get a comfortable zoom level for the map.

Getting a comfortable zoom level to display all the matching locations

More control over the zoom level

Sometimes you may wish to get more control of the zoom level for the store locator map. Locatoraid provides a number of shortcode parameters that can help you with this.

map-start-zoom

This parameter defines the zoom level for the map on the start page of your WordPress store locator. It gets displayed when a site visitor just opens your store locator page. Normally, we display all the locations on the map unless their number is too big to handle on one screen. If the default automatic result isn't working perfectly for you, you can easily adjust this zoom level . Here is an example:

[locatoraid map-start-zoom="1"]

Start zoom of the Google Maps

[locatoraid map-start-zoom="4"]

Anothert start zoom option of the Google Maps

map-max-zoom

This parameter defines the closest zoom level for the locator map to display search results. The default value is 20, so if you have just a few search results, the map will look like this:

Displaying the search results on the map

Too close? Change the shortcode parameter to a smaller value to prevent the Google Maps from zooming in beyond a certain level.

[locatoraid map-max-zoom="12"]

Stop the map zoom beyond a certain level

About Locatoraid

Lightweight, easy to use WordPress store locator plugin to help your customers find your stores, dealers, hotels, restaurants, ATMs, products, or any other types of locations. Get started with the free Locatoraid version and enjoy the beautiful add-ons of Locatoraid Pro.