• Resolved jamieburchell

    (@jamieburchell)


    Is there a way to prevent GeoDirectory from loading the Google Maps API on pages that are unrelated to the plugin? Just having the plugin installed means that the Google Maps API is loaded on every page – with the console showing:

    Google Maps API Loaded :)
    auto
    google

    I’m not actually using the map at all within GeoDirectory.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Stiofan

    (@stiofansisland)

    That is strange and not how it should work, if you can provide a link i can debug it? However you also have many map options under GD > Settings > General > (show advanced). You can set the map to lazy load on scroll, or even disable maps entierly.

    Just let me know if you need furhter help ??

    Stiofan

    Thread Starter jamieburchell

    (@jamieburchell)

    Hi @stiofansisland

    Maps API is set to automatic with lazy load off. Happy to provide a link – can I share it privately with you?

    I can see this in the HTML of the homepage which doesn’t use the directory:

    <script id="jquery-core-js-after">
        window.gdSetMap = window.gdSetMap || 'auto';
        window.gdLoadMap = window.gdLoadMap || '';
    </script>
    <script id="jquery-js-after">
       window.gdSetMap = window.gdSetMap || 'auto';
       window.gdLoadMap = window.gdLoadMap || '';
    </script>

    My console shows that window.gdLoadMap is '' and the JS code included from GeoDirectory uses that as a signal to load the map it seems

    if (!window.gdLoadMap) {
        geodirGoMapInit()
    }
    Plugin Author Stiofan

    (@stiofansisland)

    I don’t think there is a way to do that here, though u could add it here and then edit it out, i will get it in email but it will not show here. Or you can send a contact form with subject “FAO Stiofan” here: https://wpgeodirectory.com/contact-form/

    Thanks,

    Stiofan

    Thread Starter jamieburchell

    (@jamieburchell)

    Plugin Author Stiofan

    (@stiofansisland)

    Can you try with the caching pluigns disabeld, i have not see it before but i think it might be the issue. Please let me know.

    Stiofan

    Thread Starter jamieburchell

    (@jamieburchell)

    Hi @stiofansisland

    Unfortunately disabling the caching plugin did not resolve the issue when I just tested it.

    Plugin Author Stiofan

    (@stiofansisland)

    Please open a ticket here https://wpgeodirectory.com/contact-form/ with subject “FAO Stiofan” as i can’t seem to replicate this on my test sites.

    Thanks,

    Stiofan

    Thread Starter jamieburchell

    (@jamieburchell)

    Done ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Google maps loaded on every page’ is closed to new replies.