fix: Make earthquake and lightning icons visible with z-index 10000

- Added zIndexOffset: 10000 to marker options
- Increased CSS z-index from 1000 to 10000 !important
- Added position: relative to icon containers
- This ensures icons appear on top of all other map layers
- Markers are created and logged correctly but were behind other layers
pull/82/head
trancen 1 day ago
parent 5498b3773b
commit 2f1c040358

@ -113,7 +113,11 @@ export function useLayer({ enabled = false, opacity = 0.9, map = null }) {
}); });
console.log('Creating earthquake marker:', quakeId, 'at', lat, lon, 'size:', size, 'color:', color); console.log('Creating earthquake marker:', quakeId, 'at', lat, lon, 'size:', size, 'color:', color);
const circle = L.marker([lat, lon], { icon, opacity }); const circle = L.marker([lat, lon], {
icon,
opacity,
zIndexOffset: 10000 // Ensure markers appear on top
});
// Add to map first // Add to map first
circle.addTo(map); circle.addTo(map);

@ -167,7 +167,11 @@ export function useLayer({ enabled = false, opacity = 0.9, map = null }) {
iconAnchor: [size/2, size/2] iconAnchor: [size/2, size/2]
}); });
const marker = L.marker([lat, lon], { icon, opacity }); const marker = L.marker([lat, lon], {
icon,
opacity,
zIndexOffset: 10000 // Ensure markers appear on top
});
// Add to map first // Add to map first
marker.addTo(map); marker.addTo(map);

@ -874,8 +874,9 @@ body::before {
/* Earthquake icon markers */ /* Earthquake icon markers */
.earthquake-icon { .earthquake-icon {
z-index: 1000 !important; z-index: 10000 !important;
pointer-events: auto; pointer-events: auto;
position: relative !important;
} }
.earthquake-icon div { .earthquake-icon div {
@ -884,12 +885,15 @@ body::before {
justify-content: center; justify-content: center;
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
position: relative;
z-index: 10000 !important;
} }
/* Lightning icon markers */ /* Lightning icon markers */
.lightning-icon { .lightning-icon {
z-index: 1000 !important; z-index: 10000 !important;
pointer-events: auto; pointer-events: auto;
position: relative !important;
} }
.lightning-icon div { .lightning-icon div {
@ -898,4 +902,6 @@ body::before {
justify-content: center; justify-content: center;
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
position: relative;
z-index: 10000 !important;
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.