Map Showing for Development purposes only

Sorry for another one of these posts, I have inherited this site http://www.evergreen-team.com/contact/ and it has the development purposes map showing. I have an error saying You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors.

Am I missing somewhere in the theme settings where someone would have entered a previous API?

I had added my new maps API to my functions file to get it working with the code:
/google map API/
function my_add_frontend_scripts() {
wp_register_script( ‘cs-google-maps’, 'https://maps.googleapis.com/maps/api/js?key=***);
wp_enqueue_script( ‘cs-google-maps’ );
}
add_action(‘wp_enqueue_scripts’, ‘my_add_frontend_scripts’, 100);

thanks for the help!

Hi Scott,

Thanks for writing in! It seems that Google Maps API is loaded multiple times on your site which causing this issue. For example if you’re using Ubermenu on your site, you can disable Google Maps by head over to Appearance > UberMenu > General Settings > Assets > Google Maps > (uncheck) Load Google Maps API. Likewise, there could be other 3rd party plugins as well loading google maps.

To resolve this issue, please disable all of your 3rd party plugins except Cornerstone plugin and re-test your issue further. If the issue resolved, then you can activate your plugins one by one to see which plugin causing the issue.

Hope that helps.

Hi, thanks for your reply. The map was added using the WPBakery Page builder not any plugins. I did disable all plugins just to check but the same error was there after doing so. I do not have UberMenu either, so it seems it is either part of the theme?

I would think this would be likely a common issue?

Any help would be appreciated please.

Thanks

Hello Scott,

Can you remove the code you have added as you stated on the initial post? No need to add that code if you are using a X map element. It has an option to add the key on the element. I want to see your setup for Wpbakery because as I check it accepts iframe code version of the map. Let’s go back to the initial issue then. Why you have to add a certain code for using a map element when initially it should work by default. Please share credentials, inside a secure note so we can check your setup. Thank you.

I have removed the API key that I had added, thanks for your help!

Hi Scott,

It appears the visual composer map lacks of API option, instead, please create your map within the global block builder and add map element along with its other setting and API key.

Then simply insert the global block shortcode to your visual composer’s text element.

Thanks!

my map in the global block builder does not seem to have the setup area where I can choose map type and enter API key. (Screen shot attached)

Hey Scott,

Advanced Mode was turned off in the settings. I went ahead and turned it on (see screenshot)

I also created a Map Global Block for you, now you can simply edit and add your API key inside (see screenshot)

Hope this helps!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.