• Resolved cubic00

    (@cubic00)


    Hello,

    I try to embed a Google Map (Plugin “Maps Builder”) into a popup on my website. When the popup opens the map window is showing, but it is completely blank. Only when I manually resize the browser window will it show the map correctly.

    Here you can see what the map looks like when the popup is being opened: Click

    Of course I already did a little bit of googling and found the two following sites:
    Sliders inside popups in the popup maker documentation and this question at stackoverflow, learning, that popups are initialized on pageload with a size of 0x0 and thus the map not showing properly when the popup finally emerges.

    Here is what I tried according to the two pages that I mentioned:

    1. Add the following code to the functions.php (btw. I’m using theme “Illdy”)

    add_action( 'wp_footer', 'my_custom_popup_scripts', 500 );
    function my_custom_popup_scripts() { ?>
    <script type="text/javascript">
    		(function ($, document, undefined) {
        
    				jQuery('.pum').on('pumAfterOpen', function () {
       					jQuery(window).trigger('resize');
    				});
        
    		}(jQuery, document))  
    </script><?php
    }

    2. Installed the Simple Custom CSS/JS plugin, added a new js script with the following content (settings: internal, footer, in frontend)

    jQuery('.pum').on('pumAfterOpen', function () {
          // If you know the map resize function call it here. Otherwise:
          $(window).trigger('resize');
      });

    and (second try)

    jQuery(document).ready(function( $ ){
      jQuery('.pum').on('pumAfterOpen', function () {
          // If you know the map resize function call it here. Otherwise:
          $(window).trigger('resize');
      });
    });

    (in the plugin documentation it tells to wrap the code in the jQuery.ready code part)

    None of which worked. Can anybody help me find a solution to this? Any help would be much appreciated.

    Best regards, David

    • This topic was modified 7 years, 6 months ago by cubic00.
    • This topic was modified 7 years, 6 months ago by cubic00.
    • This topic was modified 7 years, 6 months ago by cubic00.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello @cubic00:

    I just inquired of the plugin developer, Daniel Iser about your support request. Bear with us as Daniel is getting caught up after the disruption caused by the tropical cyclone Hurricane Irma that hit the US last weekend.

    Thread Starter cubic00

    (@cubic00)

    It crossed my mind that this might have happened. He has certainly better things to do then and I wish him all the best.

    Best regards, David

    Hello,

    I am using the WP Store Locator and am having the same problem with the map not showing up in the popup. Have tried the different codes shown here and other places to no avail.

    url: https://savetheveteranscemetery.org/preview

    The popup is assigned to the menu item “Petition Locator”.

    Please advise.

    Thanks for your time.

    • This reply was modified 7 years, 6 months ago by Zmokin.

    cubic00 did you fixed it? I have the same problem…

    Thread Starter cubic00

    (@cubic00)

    Hello chasperlisimba,

    I was not able to fix it, my CSS/HTML/JS know-how is just not big enough. I avoided the problem by implementing the Google Map on my main page.

    Best regards, David

    Hello @cubic00 and @chasperlisimba:

    I’m sorry we did not follow up on your respective support requests in a timely manner. I’ve since received contact from other users of our plugin with a similar issue. We do have a documentation article that addresses this issue that I was unaware of when I initially responded. I am posting the link to that article here in hope that it will be useful.

    https://docs.wppopupmaker.com/article/264-sliders-inside-popups

    Hello! I have tried all solutions provided in your documentation, but nothing is working for me. Can you please help?!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Google Maps in Popup not showing until resize’ is closed to new replies.