• Resolved bytefight

    (@bytefight)


    Hey,

    I’ve installed your plugin on the stated website and there appears an error with the google map. Placeholder is getting displayed but after the consent is given the map is not loading (getting displayed). Also it’s not loading after I refresh the page. The console shows an error regarding the maps integration.

    Please help!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Aert Hulsebos

    (@aahulsebos)

    Hi @bytefight,

    A quick explanation of why this happens;

    When Google Maps gets blocked on your website, there’s a dependency issue in one of your theme’s files.

    This file (themes/bf_catuma/script.min.js) expects Google Maps to be loaded before it is triggered. Because Google Maps is blocked and is triggered after consent, it creates an error, because it is loaded out of order.

    Normally we can block a dependent script as well, and control how the files are loaded after consent is given. But in this case your theme’s file contains other functionalities as well, meaning blocking this file will break other functionalities.

    The only way this would work is to isolate adding Google Maps functionalities, so you can control loading the scripts. I see you’re using a custom theme, are you comfortable with creating a custom integration for yourself? https://github.com/Really-Simple-Plugins/complianz-integrations/blob/master/custom-google-maps.php

    regards Aert

    Thread Starter bytefight

    (@bytefight)

    Hi @aahulsebos,

    I’ve changed the integration to the Maps Embed API and it works great! Thanks for your advice!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Google Maps Javascript Error’ is closed to new replies.