Skip Navigation

[Resolved] Maps

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 5 replies, has 1 voice.

Last updated by Minesh 1 month, 3 weeks ago.

Assisted by: Minesh.

Author
Posts
#2804675

I tested the new OpenStreetMap. Very interesting and fast. The caching is very useful.
But...
It comes with a link to Leaflets and politically oriented comments.
While I might understand the concern of the developer, I don't think it is suitable to a wider audience.
Is there any way to remove or hide that?
Thanks

#2804731

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Just to ensure - can you please share few screenshot pointing out with what section you have issue with and what you would like to see instead?

#2804737
Screenshot 2025-04-10 133250.png

Thanks for reply.
When using OpenStreetMap you will see a link at the bottom right of the image as shown in the attached pic.

The link is to the following page:
hidden link
which is related to the current war between Russia and Ukraine

#2804743
Screenshot 2025-04-10 134012.png

Correction. In this moment there is no mention of the war.
It was in the morning and very prominent.
I don't know if it appears randomly or at first use.
Attached is the related pic

I find this unsuitable for use in a public website

#2804767

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Actually - the hidden link where you can find Docs, plugins etc, etc related to Open Street Maps.

But they added the popup you said and thats where (with popup you mention) we do not have any control on it.

I'll pass the information you shared with our Devs and they will check if they can able to remove the "leaflet" link.

#2807481

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please try to add the following code to your current theme's functions.php file or "Custom Code" section offered by Toolset:
=> https://toolset.com/documentation/programmer-reference/adding-custom-code/

add_action('wp_footer', function () {
    ?>
    <script>
        document.addEventListener('DOMContentLoaded', function () {
            const interval = setInterval(() => {
                const attribution = document.querySelector('.leaflet-control-attribution');
                if (attribution) {
                    // Replace with custom attribution
                    attribution.innerHTML = 'Leaflet | Map data © contributors';

                    clearInterval(interval);
                }
            }, 300);
        });
    </script>
    <?php
});

CAn you please confirm you able to change the Leaflet link.