• I’m using Popup Maker to display the store locator but the map doesn’t display.

    While researching, it seems this is a common issue with google maps and popups, but some of the posts I’ve read have solutions that resize the map via js. Although I’ve tried several options, nothing seems to work.

    Is there a solution for WP Store Locator? I can’t seem to find any posts related to this plugin.

    If you want to test the url, the popup is assigned to the menu item “Petion Locator”.

    Thanks for your time.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    There’s a fix included in the WP Store Locator code to fix this, but it does require the href value of tab to have a specific anchor.

    If you set it to ‘wpsl-map-tab’ ( <a href="wpsl-map-tab">Click</a> ), then the code to fix it runs automatically. If the href has a different value, then you can use the wpsl_map_tab_anchor filter to set a custom value.

    • This reply was modified 7 years, 6 months ago by Tijmen Smit.
    Thread Starter Zmokin

    (@zmokin)

    Hello,
    Thanks for your response.

    I have a menu item called “Signing Locations” that is set to trigger the popup. When I set the url of menu item to “wpsl-map-tab” WP sets it to “https://wpsl-map-tab&#8221;. When I click on the menu item, the popup works and displays the locator but the map is still not there.

    So I changed the menu url to “#Locator” as seen in the following screenshot:
    Menu setting

    and added the following to my functions.php:

    add_filter( 'wpsl_map_tab_anchor', 'custom_map_tab_anchor' );
    function custom_map_tab_anchor() {
        return '#Locator';
    }

    This is what shows up for the link when I inspect the code:
    <li id="menu-item-274" class="popmake-269 menu-item menu-item-type-custom menu-item-object-custom menu-item-274 pum-trigger" style="cursor: pointer;"><a href="#Locator">Signing Locations</a></li>

    The href seems to be correct but I still can’t get it to work.

    I’m trying my best to get this to work on my own, but I’m obviously not doing something correctly (also trying to work with Popup Maker support).

    Thanks for your time.

    • This reply was modified 7 years, 5 months ago by Zmokin.
    • This reply was modified 7 years, 5 months ago by Zmokin.
    Plugin Author Tijmen Smit

    (@tijmensmit)

    Try this.

    add_filter( 'wpsl_map_tab_anchor', 'custom_map_tab_anchor' );
    function custom_map_tab_anchor() {
        return 'Locator';
    }

    The # is already added in the JS script.

    Thread Starter Zmokin

    (@zmokin)

    Thanks, I made the change, but now the popup won’t activate.

    I thought maybe the name “Locator” was interfering with the popup as it uses #locator as a trigger so I changed the filter to “Petition”. No change.

    I’ve also posted all this info over on the Popup Maker forum hoping they can shed some light on what I’m missing. Hopefully between the two forums I can find a solution.

    Do you need/want access to the site to see the backend?

    Thanks for your time.

    @zmokin – The issue is that the maps JS renders the map & determines the size on page load (when the popup is hidden) and thus gets a size of 0px x 0px.

    This should do the trick:

    jQuery('.pum').on('pumAfterOpen', function () {
        jQuery(window).trigger('resize');
    });
    Thread Starter Zmokin

    (@zmokin)

    Thanks, I think I saw that code on another post somewhere (and tried it).

    But I went ahead and added your suggestion. I’m sorry for all the trouble, but this hasn’t worked either. I even tried adding the code to the actual popup.

    I understand the underlying issue (0,0) – it’s trying to figure out what code and where it actually needs to be.

    If I use the solution from the locator plugin, the popup doesn’t trigger so I have no idea if that solution works. The other popups in my menu work fine, but of course, they don’t have a map. ??

    I think someone with a bit more experience and coding knowledge than I have needs to take a look at the backend and see what I’m doing wrong – if anything.

    Please let me know if you want access.

    Thanks again to both of you for your time.

    • This reply was modified 7 years, 5 months ago by Zmokin.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Map not showing in popup’ is closed to new replies.