Skip to content

Google map not loading when I insert the tarteaucitron script #1252

Answered by AmauriC
gilles66 asked this question in Q&A
Discussion options

You must be logged in to vote

Google maps need consent so the widget is blocked until the consent.

To fix the load of the Maps when tarteaucitron allow maps, add this Javascript snippet:

document.addEventListener('googlemaps_loaded', function() {
   setTimeout(function() {
      tarteaucitron.addScript("https://yyourlocaleye.perpi.bz/wp-content/plugins/yith-woocommerce-booking-premium/modules/google-maps/assets/js/booking-map.min.js");
   }, 800);
});

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by gilles66
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants