Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The Leaflet Map controls z-index makes it overriding elements even in the Drupal back end … as the attached screenshot shows.
A lower z-index in the leaflet.css (# 71) file should help.
This for me works quite well …
.leaflet-top, .leaflet-bottom {
position: absolute;
z-index: 10;
pointer-events: none;
}
Comment | File | Size | Author |
---|---|---|---|
#3 | leaflet-control_z_index-2005396-3.patch | 660 bytes | Dentorat |
leaflet_controls_z_index.jpg | 295.44 KB | itamair |
Comments
Comment #1
RdeBoerConfirmed today that this is indeed still an issue with the latest Leaflet JS 0.6.4.
Following italo's suggestion, in file sites/all/libraries/leaflet/leaflet.css, line 79, I changed the z-index from 1000 to 499 and it fixed the issue of the +/- control sliding over the admin menu bar while at the same time the map canvas slides under.
Maybe this fix should be part of a leaflet.css inside the Leaflet module (as opposed to Leaflet JS) ?
Comment #2
RdeBoerDuplicate of #1791026: Zoom control showing through overlay.
Comment #3
Dentorat CreditAttribution: Dentorat commentedHere's a patch, only one line was needed (the others are in the leaflet library), I set it to 100 so site builders can still have things above it and still below the overlay. There is also a patch in #1791026 that doesn't use a css file.
Comment #4
hutch CreditAttribution: hutch commentedJust to confirm that the patch in #3 patches clean on a fresh pull of current dev and prevents the zoom control from shining through the admin overlay.
Comment #5
gcbFixed in Dev using patch from #1791026.
Comment #6
VBN CreditAttribution: VBN commentedAs of today this problem still resists in 7.x.1.1
Changing the z-index to 100 of leaflet.css in sites/all/libraries/leaflet did indeed the trick.
Thx
Comment #7
RdeBoerRe-opening based on #6 and #2453881: Zoom buttons are over all.
Is creating a new release from 7.x-1.x-dev all we need to do to fix this?
Image from original poster to clarify the issue (a picture tells a thousand words):