Multiple map on a page problem

Thanks for repoprting this.

I have identified it is an issue with the way the plugin loads the Google maps API multiple times.

To fix with the SAME API key you can edit the main plugin file replace lines 126/127

<script src="https://maps.googleapis.com/maps/api/js?key=<?php echo sanitize_text_field( $atts['key'] ); ?>"
                type="text/javascript"></script>

with

global $map_out;
        if  ( $map_out!='yes') {
           $map_out='yes'; ?>
        <script src="https://maps.googleapis.com/maps/api/js?key=<?php echo sanitize_text_field( $atts['key'] ); ?>"
                type="text/javascript"></script>
        <?php } ?>

I don’t have a quick fix to release for this yet and I need to test the case when different API keys are used. ( the above will NOT work for different API keys )

But I have logged it as bug to work on.

Hi @alanfuller

Thank you so much for your quick reply. It works for me.

All the best.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Your Advertisement Here