• Resolved anjanphukan

    (@anjanphukan)


    Hi,

    I was trying to add multiple maps on a single map with the same API key. It shows the maps, but the cmap controls can be seen only on the last map and rest of the maps get converted to images.

    Here is the screenshot – https://tinyurl.com/2m258ouj

    Is there a way to fix this?

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Alan Fuller

    (@alanfuller)

    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.

    Thread Starter anjanphukan

    (@anjanphukan)

    Hi @alanfuller

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

    All the best.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multiple map on a page problem’ is closed to new replies.