• Hello.
    I’m trying to use tabs with BGMP: i want to have list ([bgmp-list]) on tab 1 and map ([bgmp-map]) on tab 2:
    https://wp.the-mill.ru/test/
    However, the map doesn’t work properly (no error, just a grey rectangle).
    I’ve tried 3 different tabs plugins (they all use shortcodes) with exactly the same result.
    If I put map in the tab 1 – it works fine, but I need it on the tab 2.

    Any ideas how to fix this?

    PS
    I’ve also added this code to functions.php as explained on the installation manual:
    function bgmpShortcodeCalled()
    {
    global $post;
    $shortcodePageSlugs = array(
    ‘test’
    );
    if( $post )
    if( in_array( $post->post_name, $shortcodePageSlugs ) )
    add_filter( ‘bgmp_map-shortcode-called’, ‘__return_true’ );
    if( ( function_exists( ‘is_front_page’ ) && is_front_page() ) || ( function_exists( ‘is_home_page’ ) && is_home_page() ) )
    add_filter( ‘bgmp_map-shortcode-called’, ‘__return_true’ );
    }
    add_action( ‘wp’, ‘bgmpShortcodeCalled’ );

    https://www.ads-software.com/plugins/basic-google-maps-placemarks/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ian Dunn

    (@iandunn)

    If you look in your browser’s dev console, you’ll see an error saying, You have included the Google Maps API multiple times on this page. This may cause unexpected errors.

    I’d start there and see if fixing that makes it work.

    Thread Starter the_cats_paw

    (@the_cats_paw)

    Hello Ian,
    I’ve switched my theme to the default one and this error (You have included the Google Maps API multiple times on this page) is gone now, however you can see that this didn’t fix the initial issue the map not showing up:
    https://wp.the-mill.ru/test/
    I’ve tried different themes, different tabs plugins – with no result.

    Plugin Author Ian Dunn

    (@iandunn)

    Hmmm, I wonder if it works when it’s on tab 1 because then Google Maps renders everything when the page loads, but when it’s on page 2 then the containing div is hidden when the page loads, so it doesn’t render, and there’s nothing to tell it to initialize the render when the tab changes? If that’s the case, there might be a solution if you Google something like “Google Maps tabs”.

    If it’s not that, I’m not sure what it’d be.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘BGMP with tabs’ is closed to new replies.