Skip to main content

Google Maps API Blocker

 Standard Snippet

<div id="sites-map" style="min-height: 500px;width:100%;"></div>

<script>
    function initMap() {

    var map = new google.maps.Map(document.getElementById('sites-map'), {}

....

</script>

<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDvbl7w5vhj-hdLIIaS_SqpxwgiHIm5VKw&callback=initMap"></script>

 Angepasstes Snippet

<div id="sites-map" style="min-height: 500px;width:100%;">
  <div class="embed embed-responsive embed-responsive-16by9">
    <div data-service="googlemaps"  height="100%" data-id="" data-autoscale data-title="Beispiel Google Maps"></div>
  </div>
</div>
<script type="text/plain" data-cookiecategory="googlemaps">
    function initMap() {

    var map = new google.maps.Map(document.getElementById('sites-map'), {}

....

</script>

<script type="text/plain" data-cookiecategory="googlemaps" async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDvbl7w5vhj-hdLIIaS_SqpxwgiHIm5VKw&callback=initMap"></script>

Dokumentation:

https://github.com/orestbida/iframemanager