Remove Google Maps

Hey guys,

I couldn’t find a proper solution to my problem yet, that’s why I started a new topic. I do not want to use google maps at all on my clients website. That’s why I do not want to set up an API key. Not to mention that I do not want to pay for that. I get many errors and a warning on my site (in the browsers inspector). Is it possible to completely disable/remove google maps? I tried some plugins and also this code:

   function sydney_remove_google_maps() {
 	// Disable Google Map
 	wp_dequeue_script( 'sydney-gmaps-api');
   }
   add_action( 'wp_enqueue_scripts', 'sydney_remove_google_maps', 999 ); 

Nothing worked yet. I hope you can help.

Thanks in advance.

Cheers
Charly

Hello Charly,

I’ve just tried to apply that PHP snippet on my local Sydney Pro install and it worked as expected. How exactly you tried to apply it on your website?

Kind Regards, Roman.

Hey roman,

I added the exact same lines in theme functions.php (in the backend’s editor). I’m using a child theme.
What can I do?

Cheers,
Charly

Hello Charly,

Well, you can try to add that code using Code Snippets plugin (that’s how I added it):

Kind Regards, Roman.

Hi Roman! That doesn’t work either. In Google Chrome there is this Warning:

And in Safari it’s additionally these Errors:

I just created a new subdomain to recreate this error. As soon as I install Sydney Pro the Error/Warnings appear. E.g. in google Chromes inspector (Tab: Sources) “maps.googleapis.com” is loaded, whereas I tried the upper mentioned code directly in the functions.php and with the code snippets plugin. What can I do?

Hello Charly,

I asked our Developer to check your issue, let’s see what he says.

Kind Regards, Roman.

I can’t wait to hear what he says :slight_smile: Thanks for your help so far.

I just found out that there are two different google maps Sources going on. Here the screenshot without the code:
image

And here with the code:
image

(I also deleted fonts with the code)

So it’s the maps.googleapis.com which isn’t removable.

Hello Charly,

It looks like there is no easy workaround, unfortunately. But I’ve already added this issue to our list, so it should be fixed in a future theme version. Please feel free to ask any other questions that you might have.

Kind Regards, Roman.

Ok,
thank you, Roman.

Cheers
Charly

You are welcome Charly!

Kind Regards, Roman.

Hey again.

Sorry for the inconvenience… I really need to get rid of this “maps.googleapis.com”. If you go to your demo-site of sydney pro ( Demo Sydney ) , you got the same issue (see screenshot).

Isn’t there a workaround to prevent loading this script?

Hello Charly,

I asked our Developer to check this topic once again.

Kind Regards, Roman.

Thanks a lot Roman! Much appreciated!

You are welcome Charly!

But please note that I might get the answer after weekend, hope for your understanding.

Kind Regards, Roman.

1 Like

That’s totally fine, Roman!
Cheers
Charly

1 Like

Hi there,

Sorry for the long wait. An update will be pushed today to handle this.

Regads,
Vlad

2 Likes

Hey Vlad,

thanks so much. The updates has done its job. Thanks a lot. Also to you, Roman. Have a great day guys.

Cheers
Charly

1 Like

Hi there.

I am facing the same issue. Could you please let me know what steps you followed in order that google.maps is off of you site? I am running the latest version and have disabled maps everywhere where I found it, but it is still showing in the inspector.

Regards,

Bob