• Resolved wpweaver

    (@wpweaver)


    THe Google Maps block seems to fail on a Multisite installation. It seems to work okay on a single site.

    The editor end works, but I get this javascript displayed as text on the visitor view (and no map displayed):

    window.addEventListener(‘load’, function() { if (typeof google === “undefined”) return null; var location = { lat: parseFloat(39.4013703), lng: parseFloat(-107.21339360000002) }; var contentHtml = ‘<div class=”advgbmap-wrapper”><h2 class=”advgbmap-title”>Eiffel Tower</h2><p class=”advgbmap-desc”></p></div>’; var mapStyle = ”; var map = new google.maps.Map(document.getElementById(‘advgbmap-xxxxxxx’), { zoom: 18, center: location, styles: mapStyle !== ” ? JSON.parse(mapStyle) : {}, gestureHandling: ‘cooperative’, }); var infoWindow = new google.maps.InfoWindow({ content: contentHtml }); var marker = new google.maps.Marker({ position: location, map: map, title: ‘Eiffel Tower’, animation: google.maps.Animation.DROP, icon: { url: ‘https://maps.gstatic.com/mapfiles/api-3/images/spotlight-poi2.png’, scaledSize: new google.maps.Size(27, 43), }, }); marker.addListener(‘click’, function() { infoWindow.open(map, marker); }); })

    • This topic was modified 6 years, 1 month ago by wpweaver.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    It seems to be related to unfiltered_html issue you found on the other post.
    The <script> tag have been removed and then displays it as plain text.
    We’re working on it ??

    JoomUnited

    (@joomunited)

    Hi,

    We just updated Advanced Gutenberg to fix the unfiltered_html on the Google Maps block.
    Could you re-check?

    Cheers,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Google Maps on Multisite’ is closed to new replies.