Wondering how the map focus works in Store Locator Plus? The zoom settings are a key element to getting your map to focus where you want and to zoom in to the right level. There are several key settings that impact how the map renders initially and during search mode. Since initial display and search results are the two primary map display modes, we will break down our discussion into those elements. In all cases the Google Maps zoom levels are 0 (zero) for “wide global view” and 20 for “house view” or “ant hill view” as we like to call it.
The initial map display has several modes depending what add-on packs and settings are enabled. The modes are static image, basic map, and map with initial locations.
If you do NOT select “immediately show locations” the initial map will be centered on the country that you selected under “Country” in map settings.
The map will be focus at the “Zoom Level” you selected under the Map Settings / Map / Dimensions section.
For example, if you selected United States as your country and set a zoom level of 4 the map would put the middle of the USA (somewhere in the Midwest) at the center of the map and zoom out to show most of North and South America.
Map With Initial Locations
If you checked “Immediately Show Locations” the page will start by searching for any locations within the default radius you set in “Radii Options” from the center of the map. The center is defined as noted in “Basic Map” above, either the center of the country. The total locations returned is determined by the “Number To Show Initially” setting.
The map will populate with the markers for all the matching locations.
The center of the map will be set to the center of an imaginary box, called the “bounding box”, that is drawn around all of the locations that matched.
Google will then auto-zoom the map zoom level to whatever setting is necessary to show all of the pins.
This is where “Zoom Adjustment” comes in. In most cases you will want to leave this to 0 as the Google Maps V3 system does a good job at getting all of your pins to show. However, in some cases Google will crop the box too tightly and put your marker right on an edge making them hard to click and get the info bubble. In these cases you can “back off” the Google Zoom by using Zoom Adjustment. Store Locator Plus will zoom out however many “steps” you specified in the Zoom Adjustment setting. From a technical standpoint we are doing a simple subtraction of this setting from the Google-calculated auto-zoom setting.
For example, if you set “initially show 25 locations within 100 miles of the middle of the United States”, all 25 locations that are closest to the Midwest will bet created on the map. For the sake of discussion we will say that they all appeared in the Midwest so Google determines the best zoom level is 10. You decided Google zooms to tightly so you set the Zoom Adjustment to 2. When the map is drawn will will have all the pins and zoom to level 8. This will leave some extra space around the edges of the map with no pins.
A Noted Exception has been made if only a single location is returned. In this case Google would always auto-zoom to a very tight street level mode. You cannot tell what city, county, state, or country the location is in. For this reason Store Locator Plus will simply center the map on that location and use the initial “Zoom Level” setting to determine how tight to zoom in on the map.
In search mode the map zooms similar to the Map With Initial Locations as noted above with one exception. The address that was entered in the search is included in the auto-zoom bounding box.
A single search result. Centers between both the address pin and the result pin and zooms to include both. ”Zoom Adjustment” is used to tweak the zoom level.
With multiple search results the map centers on the results plus the home pin (entered address) and auto-zoomed. “Zoom Adjustment” is used to tweak the zoom level.
If no results match the search the map is centered on the entered address and the previous zoom level is retained.
There have been multiple tweaks to the zoom feature over the past couple of years. A bug in the 3.2 to 3.5.3 releases cause some erratic behavior which has since been address.