Making "Map It" link pics non-clickable
brandofamily
Registered Users Posts: 2,013 Major grins
Is it possible to make the "Map It" link pics non-clickable? I just want the pic to pop up when I click the point on the map but I do not want some one to be able to click the pick and make it larger/ open the pic in it's gallery.
0
Comments
Could you include a link to a specific page on where you'd like to do that so we could take a look?
SmugMug Support Hero
The other site is not live yet but I added the feature to my site so you could play w/ it.
https://brandolinoimaging.com/Unlisted-Picture-Galleries/Other/Test-2-Map/
Another Hero and I gave it a try, but couldn't get any CSS to apply to the map as it's third party embedded content.
SmugMug Support Hero
Any luck getting it to do anything? Like redirecting to homepage instead of to gallery?
Thanks for the effort.
You might be able to add a transparent gif over the map that would block links.
My Website index | My Blog
How would I accomplish that?
Remember few years ago you used to click on photos and only got the covering GIF file.
My Website index | My Blog
I believe I found a solution, but you'll have to try it out, make sure it works, and make sure it doesn't break anything else:
.leaflet-popup-content > a {
pointer-events: none;
cursor: default;
}
I tested it and it seems to work, but I only spent about 5 minutes on this. I just had to get out of bed and try it out when I read the comment above that CSS can't be applied to maps, since I did quite a bit of customizing the maps on my site with CSS. 99% of the credit goes to: https://css-tricks.com/pointer-events-current-nav/. They say it doesn't work in every browser, but that was written 10 years ago.
Edit: works fine on mobile too.
Dave
It seems to work, at least in FireFox!
Thanks!