Skip to main content

Troubleshooting: My map is not loading

Common fixes for when your store locator map won't load, shows errors, or gets stuck on the loading message.

If your store locator isn't showing a map, don't panic. It's almost always one of a few simple things. This guide covers the most common causes and how to fix them.

Check your API key first

The most common reason for a map not loading is a missing or invalid API key. Head to your Map Provider settings and make sure your Google Maps API key or Mapbox access token is entered and saved.

If the field is empty, you'll need to create one. Follow our guide for Google Maps or Mapbox.

Google Maps: common fixes

Required APIs on your project

Google Maps requires these APIs to be turned on in your Google Cloud Console:

  1. Maps JavaScript API β€” renders the map

  2. Geocoding API β€” converts addresses to coordinates

  3. Geolocation API β€” used during StoreRocket's setup check

  4. Places API (New) β€” powers the address search

If your project also has Places API (the legacy one, without "New") available, enable it as well. Our widget uses the new Places API by default but falls back to the legacy one if the new one ever fails. Keeping both enabled gives you the most reliable setup. New Google Cloud projects may not show the legacy Places API option, and that's fine.

Do not disable the legacy Places API if it's already on your project. Some older articles on the web suggested disabling it, which breaks the fallback path and is no longer the correct advice.

Required APIs also need to be allowed on your key

This is a separate setting that catches a lot of people off guard. Enabling an API on your project lets the project use it, but your specific API key also needs to have the API in its allowed list.

Go to Google Cloud Credentials, click your key, scroll to API restrictions, and either keep the key unrestricted (less secure) or select Restrict key and add every API from the list above. For production use, we strongly recommend restricting the key to just the APIs you need.

"ApiTargetBlockedMapError" in the console

This specific error means your key's API restrictions list is blocking the API. Most common when customers enable Places API (New) on their project but forget to add it to their key's allowed list.

Fix: Go to Credentials, click your key, scroll to API restrictions, and make sure Places API (New) is checked. If the legacy Places API is also available on your project, check that too.

Your domain needs to be in the allowed list

If you restricted your API key to specific domains (which you should), make sure your website is listed. Go to Google Cloud Credentials, click your key, and check the HTTP referrer list. Add your domain in this format: *yourdomain.com/*

Don't forget to also add *storerocket.io/* and *.storerocket.io/* so the preview in your dashboard works.

Billing needs to be enabled

Google requires an active billing account even if you stay within the free tier. If billing isn't set up, the map won't load at all. Go to Google Cloud Billing and link a billing account to your project.

Gray, darkened, or blank map

Usually one of these four things:

  1. Billing isn't active on the project

  2. Maps JavaScript API isn't enabled (or not in the key's allowed list)

  3. Your domain isn't in the HTTP referrers list

  4. The API key is invalid or mistyped

Check each in the Google Cloud Console and the API dashboard.

Mapbox: common fixes

Check your access token

Go to Map Provider settings and verify your Mapbox token is correct. You can find your token at mapbox.com/account/access-tokens.

Make sure the token has the right scopes enabled. The default public token works fine for most setups.

"Can't find variable: mapboxgl" error

This means the Mapbox GL JS library failed to load. Check that your website isn't blocking external scripts. Try in an incognito window. If you're on Shopify, make sure the embed code is in a Custom HTML section, not a text block.

"Store locator is loading..." stuck

If you see the message "Store locator is loading from StoreRocket Store Locator App..." and it never goes away, the widget script failed to load. A few things to check:

  1. Are you using the latest embed code? Go to Widget > Install and copy the embed code again. Older versions may not work correctly.

  2. Is something blocking the script? Ad blockers, privacy extensions, or your website's Content Security Policy can prevent external scripts from loading. Try in an incognito window with extensions disabled.

  3. Check the browser console. Right-click the page, select "Inspect", go to the Console tab. Look for red error messages, they usually point to the exact problem.

"For development purposes only" watermark

This Google Maps watermark means billing isn't active on your Google Cloud account. Go to Google Cloud Billing, link a billing account, and the watermark will disappear. You won't be charged unless you exceed 10,000 map loads per month.

Map was working but suddenly stopped

This happens more often than you'd think. Common causes:

  1. You republished your website. Platforms like Webflow and Squarespace can strip the embed code when you republish. Check that the StoreRocket code is still on the page and re-add it from your Install page if needed.

  2. Your domain changed. If you switched from www to non-www, moved to a new domain, or changed your Shopify theme, update your Google Maps API key referrers in the Google Cloud Console.

  3. Google billing expired. Check that your billing account is still active at Google Cloud Billing. Credit cards expire and payment methods can fail.

  4. Your subscription lapsed. Check your Billing page to make sure your StoreRocket subscription is active.

Platform-specific issues

Shopify

Widget not loading after a theme update? The embed code may have been removed. Re-add it from your Install page. Also make sure your API key referrers include *admin.shopify.com/* and your store domain.

Squarespace

Squarespace uses Ajax page transitions that can prevent scripts from running. If your widget loads on direct page access but not when clicking through your site navigation, disable Ajax loading in Squarespace settings.

Webflow

The widget won't show in Webflow's Designer preview. You need to publish and check the live site. If it disappears after republishing, re-paste the embed code.

WordPress

Security plugins (Wordfence, iThemes) and caching plugins (WP Rocket, W3 Total Cache) can interfere. Whitelist cdn.storerocket.io in your security plugin and clear your cache after making changes.

Still not working?

Try these quick steps:

  1. Clear your browser cache (or try incognito mode)

  2. Try a different browser

  3. Check the browser console for specific error messages

  4. Make sure your embed code is from Widget > Install

If none of that helps, reach out on live chat and share your widget URL. We'll take a look.

Did this answer your question?