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

    (@aahulsebos)

    Hi @pstidsen,

    For Google Maps with ACF to work we have 2 integrations;

    ACF & Google Maps, one is under Integrations -> Plugins, the other under Services.

    Try enabling both, if not yet already. Or disable both to see if the map works.

    regards Aert

    Thread Starter pstidsen

    (@pstidsen)

    Hi there,

    Thanks for the quick reply! ??

    They are both activated. Disabling Integrations -> Plugins -> ACF made the map work. But is that compliant?

    Plugin Contributor Aert Hulsebos

    (@aahulsebos)

    Hi @pstidsen,

    Can you activate both again, so we can have a look?

    Thanks, regards Aert

    Thread Starter pstidsen

    (@pstidsen)

    Hi Aert,

    Both are activated now.

    However, we are moved to a new domain this night. You will be redirected to the new site if you go to the link in the original post but delete the ?cmp-part

    / Peter

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Hi @pstidsen,

    It looks like this is a custom Google Maps implementation from the theme.

    Can you try to add the following string to complianz/integrations/script center, in the field where it says “part of url’s that should be blocked”

    show_google_map_acf.js

    It is possible you need to add a dependency, but let’s first try this.

    Thread Starter pstidsen

    (@pstidsen)

    Hi Rogier

    Thanks for your reply. I recognize that script. I have added it to the list and something is better. On load the map is loaded with placeholder. However, on accepting cookies it disappear. Maybe I should add a dependency? Which one?

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Can you add a mu-plugin, as described here:
    https://complianz.io/adding-filters-with-mu-plugins-quick-easy/

    With the following code:
    This code makes sure the acf.js file waits for the google api to be loaded.

    /**
     * add the dependency
     * $deps['wait-for-this-script'] = 'script-that-should-wait';
     */
    function cmplz_multimarker_dependencies( $tags ) {
    	$tags['maps.googleapis.com/maps/api/'] = 'show_google_map_acf.js';
    
    	return $tags;
    }
    add_filter( 'cmplz_dependencies', 'cmplz_multimarker_dependencies' );
    Thread Starter pstidsen

    (@pstidsen)

    Hi Rogier,

    That’s great, it worked. Thanks!

    Is this filter the same as declaring $deps in wp_enqueue_script?

    Best Regards,
    Peter

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Hi Peter,

    It’s a similar approach indeed. Glad it worked!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Custom Google Map is blocked’ is closed to new replies.