diff --git a/src/plugins/layers/useEarthquakes.js b/src/plugins/layers/useEarthquakes.js index c00907c..c4438ad 100644 --- a/src/plugins/layers/useEarthquakes.js +++ b/src/plugins/layers/useEarthquakes.js @@ -92,24 +92,26 @@ export function useLayer({ enabled = false, opacity = 0.9, map = null }) { // Check if this is a new earthquake (but not on first load) const isNew = !isFirstLoad.current && !previousQuakeIds.current.has(quakeId); - // Calculate marker size based on magnitude (M2.5 = 12px, M7+ = 36px) - const size = Math.min(Math.max(mag * 5, 12), 36); + // Calculate marker size based on magnitude (larger = stronger earthquake) + // M1-2: 16px, M3: 20px, M4: 24px, M5: 28px, M6: 32px, M7+: 40px + const size = Math.min(Math.max(mag * 6, 16), 40); - // Color based on magnitude + // Color based on magnitude (gets redder with stronger quakes) let color; - if (mag < 3) color = '#ffff00'; // Yellow - minor - else if (mag < 4) color = '#ffaa00'; // Orange - light - else if (mag < 5) color = '#ff6600'; // Deep orange - moderate - else if (mag < 6) color = '#ff3300'; // Red - strong - else if (mag < 7) color = '#cc0000'; // Dark red - major - else color = '#990000'; // Very dark red - great - - // Create earthquake icon marker with seismic wave visualization + if (mag < 2) color = '#90EE90'; // Light green - micro + else if (mag < 3) color = '#FFEB3B'; // Yellow - minor + else if (mag < 4) color = '#FFA500'; // Orange - light + else if (mag < 5) color = '#FF6600'; // Deep orange - moderate + else if (mag < 6) color = '#FF3300'; // Red - strong + else if (mag < 7) color = '#CC0000'; // Dark red - major + else color = '#8B0000'; // Very dark red - great + + // Create earthquake icon with visible shake/wave symbol const waveIcon = ` - - - - + + + + `; @@ -132,7 +134,7 @@ export function useLayer({ enabled = false, opacity = 0.9, map = null }) { iconAnchor: [size/2, size/2] }); - console.log('Creating earthquake marker:', quakeId, 'at', lat, lon, 'size:', size, 'color:', color); + console.log('Creating earthquake marker:', quakeId, 'M' + mag.toFixed(1), 'at', lat, lon, 'size:', size + 'px', 'color:', color); const circle = L.marker([lat, lon], { icon, opacity,