Map Not Displaying on Page

You are here:

If your map is correctly displaying in the preview but it doesn’t display when visiting the live page, it’s possible there’s a conflict with some other element on your page or you’ll need to adjust some settings. Below is a list of the most common issues.

Conflict with Caching/Minify Plugin

  • Are you able to see the map perfectly when visiting your site when logged in but not when logged off?
  • You can see the map on desktop but not when when you visit the site on mobile?

If you’re using a cache/minify plugin, it’s possible you might need to adjust that plugin’s settings. You can confirm if that plugin is the culprit by temporarily disabling cache or the plugin itself, to confirm it’s the source of the issue. Using cache minify plugins might cause unexpected javascript errors, specially because of the JS minify process. Sometimes there’s code on other plugins that might break when minified. Usually creating an exception on the map files for them not to be minified and hopefully run first than the rest of the code solves the issue. Check this article on how to use the plugin with WP-Rocket. If you’re using other cache plugins, the process might be similar.

Repeating Shortcodes on the Same Page

  • You’re able to see the map on desktop but not on mobile or vice-versa?

This is a common issue when using page builders and using different containers for desktop and for mobile. Using this approach you might end up repeating the same map shortcode twice on the page, once for mobile and another for desktop. Since it’s the same shortcode, only the first one will render properly. The solution is to set the container with the map to be used on all scenarios, so that you don’t need to repeat the shortcode. Another approach would be to clone your map so you have 2 different shortcodes. The important thing to remember is that a shortcode for a unique map ID can only render once per page. You can have multiple maps if they have different IDs.

Incorrect Visual Settings Values

  • The map preview doesn’t display correctly
  • You have values in the Visual Settings > Viewport Settings

If you have values to change the initial zoom and center, in the viewport settings, it’s possible they are wrong and affecting the visuals of the map. Delete those values to double check if that’s the source of the issue.

Too Much Data – Max Input Vars issue

  • Map is displaying, but has some issues?

If you’re map is actually displaying but some information is missing or some features are not working correctly, you might be facing the max input vars issue.

More information about this issue.