Map element - Google Maps API - Integration with Complianz GDPR cookie plugin

Since issues with GDPR and use of Google functions are of primary importance here in Europe right now I’ve been concerned with testing solutions for allowing Google maps in a compliant way. Using the “Complianz” plugin seems the best method I have found so far - it loads a placeholder in lieu of the map until consent is given, at which point the map is then loaded.

I’ve been communicating with the developers in the Netherlands for help integrating for functionality with the Pro map element. It works find with embedded Google maps but not with the API method.

We/they have been able to block the map from loading prior to consent being given but not figured out how to re-trigger a “load” event:

Blocking the Map and adding a placeholder works correctly, but (re)initializing the Map after providing consent not yet.
I’ve already tried re-triggering a ‘load’ event:
dispatchEvent(new Event(‘load’));
But that doesn’t work in this case. I can’t tell how their code is being initialized as it’s minified, making it hard to read. Could you ask the developers of this theme how we should re-initialize their Google Maps script?

They are keen to include Pro/Cornerstone as an integration to the plugin so that it works seamlessly. More info in secure note to follow…

!!! Just realised this should probably not be in the beta forum. I’ve been testing this with RC1 but I guess it’s a general issue, not beta related specifically. Sorry.

1 Like

We appreciate your thoughts regardless of which forum you used thanks.

So overall, you need a way to reload our map element? I’ll have to look at options. I don’t think doing another “load” event is the answer, but maybe another event name like “MapReload”.

I think so. They also wrote the following:

We created a similar integration (that includes a re-initialization part) for the “Divi” theme, which appears to be very similar to this implementation. You can provide that code as an example for the Pro theme developers, perhaps this will help provide a better understanding of what we’re exactly looking for:

1 Like

Thanks, this is great. We’ll look into solutions.