Skip to content
View in the app

A better way to browse. Learn more.

thirty bees forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Remove Google Maps API

Featured Replies

Hello there,

I'm just trying to optimize the speed of my page a little and most complains gtmetrix has come from the Google Maps api.

Since I'm not using any map (front + backoffice), I want to simply remove the whole api. But...how?

Can anyone tell me where the maps api is located?

Hello My Thirtybees front doesn't load any Google Maps API. I think you have to disable any module that could load the Google Maps API or may be check if it's your theme that loads it.

  • Author

Hmm, is there a way to trace it back? I can't see a module that seems obvious.

But perhaps I just ask the template-support.

  • Author

Ah ok, it actually was a module - in my case TM Mega Menu. I just edited the file modules > tmmegamenu > tmmegamenu.php

Somewhere there (line ~2679) are two lines like this '://maps.google.com/maps/api/js?region='.Tools::substr($defaultcountry->isocode, 0, 2);

I just removed the first part so it looks like this: :''.Tools::substr($defaultcountry->isocode, 0, 2);

@manisch that's not a good solution. This will probably create script tag in your page like this:

<script type="text/javascript" src='httpen' /> that will result in http request to your domain, ie: http://www.domain.com/httpen. Request will return 404 not found, and you'll get error code in your console. Immediately after that you will find another couple of errors related to missing google maps library, because javascript code that utilize this library is still present...

  • Author

@datakick hmm, right now everything seems fine. What would you suggest?

@Manisch I would need to see source code of the module. But I believe that the line you've mentioned starts with something like this:

$this->context->controller->addJS(....

You will want to remove the whole line. Next, search for text 'google.maps' in *.js files of this module... and get rid of all references to google maps api... somehow...

  • Author

@datakick it might seem a little dirty, but I was just glad it works without error so far :D But it actually looks like this (XXX marks where once was the url)

$google_script = 'http'.((Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE')) ? 's' : '').'XXX'.Tools::substr($default_country->iso_code, 0, 2); $entry = strpos(implode(',', $this->context->controller->js_files), $google_part); and

$this->context->controller->addJS('http'.((Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE')) ? 's' : '').'XXX'.Tools::substr($default_country->iso_code, 0, 2)); $this->context->controller->addJS($this->_path.'views/js/admin.js');

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.