Lightning:
- Strike IDs now include rounded timestamp (10s intervals)
- This allows strikes to 'cycle' and be detected as new every 10 seconds
- Strikes stay at same location but IDs change to trigger updates
- Stats panel now updates properly every 30 seconds
Earthquakes:
- Added console logging to debug why markers don't appear
- Logs: fetch count, enabled state, marker creation count
- Will help identify if it's a data fetch or rendering issue
CRITICAL FIX - Lightning was still moving because:
- ID was stable (good)
- BUT actual lat/lon used Math.random() every refresh (bad!)
- Result: Same ID, different position = markers moved
Solution - Seeded Random Generator:
- Use current minute as seed
- Generate consistent positions within each minute
- Same strike ID always gets same lat/lon
- Uses simple Linear Congruential Generator (LCG)
Changes:
- Replace Math.random() with seeded random
- Base seed on Math.floor(now / 60000)
- Each strike index generates consistent offsets
- Use rounded positions for both ID and coordinates
- Positions stable for entire minute, then slowly evolve
Also updated Earthquakes:
- Changed feed to all_hour.geojson (more data for testing)
- Updated metadata to v1.2.0
- Updated description to reflect 1-hour data
Result:
- Lightning strikes stay in EXACT same position
- No more moving/dropping/scrolling
- Icons only appear to move when they age out (30 min)
- Professional, stable behavior
Major visual improvements and Lightning stability fix:
LIGHTNING FIXES:
- Fixed 'dropping' issue: Stable IDs based on rounded location + minute
- Was generating new IDs every refresh (timestamp-based)
- Now: ID = rounded_time + rounded_lat + rounded_lon
- Result: Same strikes keep same ID across refreshes
VISUAL IMPROVEMENTS - Icons instead of circles:
Earthquakes (🌋):
- Replaced circle markers with volcano emoji icon
- Size scales with magnitude (12-36px)
- Color-coded by magnitude (yellow → dark red)
- NEW: Shaking animation with rotation and translation
- Shake effect: vibrates at exact location (no sliding)
Lightning (⚡):
- Replaced circle markers with lightning bolt emoji icon
- Size scales with intensity (12-32px)
- Color-coded by age (gold → brown)
- Bright flash animation with gold glow
- Icons much more recognizable than circles
ANIMATION IMPROVEMENTS:
- Earthquake: Shakes in place with 0-2px movement + rotation
- Lightning: Flashes with brightness + gold shadow
- Both: Icons stay at exact coordinates
- No more 'dropping' or 'sliding' effects
Benefits:
- Immediately recognizable event types
- Professional appearance
- Better visual hierarchy
- Icons scale better at different zoom levels
The 'dropping to bottom of screen' effect was caused by ALL markers
animating on every data refresh, not just truly new events.
Root cause:
- On first plugin enable: previousQuakeIds/previousStrikeIds is empty
- Every marker looked 'new' and animated
- On data refresh (every 5 min): all markers recreated and animated
- Result: appeared as if markers were 'dropping' or 'falling'
Solution:
- Added isFirstLoad ref flag for both plugins
- First load: populate previousIds but DON'T animate
- Subsequent loads: only animate truly NEW events
- isNew = !isFirstLoad && !previousIds.has(id)
Behavior now:
- Enable plugin: Markers appear static (no animation)
- Wait 5 min refresh: Still static (no animation)
- NEW earthquake/strike detected: ONLY that one animates
- Result: Clean, professional, no 'dropping' effect
Applies to:
- Earthquakes: Fixed
- Lightning: Fixed
The transform: scale() was causing markers to move across the screen
because Leaflet's coordinate system doesn't handle transforms well.
Changed approach for both Earthquake and Lightning plugins:
- REMOVED: transform: scale() animations
- ADDED: brightness and drop-shadow effects instead
- Earthquakes: Flash with brightness (3x → 1x) and glow
- Lightning: Flash with brightness (4x → 1x) and gold glow
- Updated timing: 0.8s for both plugins
Result:
- Markers stay in their exact location
- Visual 'explosion' effect at the point
- No movement across screen
- Clean brightness flash to highlight new events
The error 'Cannot read properties of undefined (reading classList)' was
caused by trying to access circle._path before the marker was added to
the map and rendered in the DOM.
Fix:
- Add marker to map FIRST (circle.addTo(map))
- THEN wait 10ms for DOM element to be created
- Only then access circle._path.classList
- Added try/catch with console.warn for safety
- Remove duplicate circle.addTo(map) call
This ensures the SVG path element exists before we try to animate it.
- Remove infinite pulse animation from all earthquake markers
- Animation now plays ONLY for newly detected earthquakes
- Animation class removed after 0.6s (after animation completes)
- Prevents markers from continuously moving/pulsing
- Fixes visual distraction issue
Changes:
- CSS: Removed infinite animation from .earthquake-marker class
- JS: Animation class added temporarily only for new quakes
- JS: setTimeout removes animation class after completion
- Weather Radar (wxradar): NEXRAD overlay documentation
- Earthquakes: v1.1.0 with animated new quake detection
- Aurora Forecast: OVATION model visualization guide
- Gray Line: Solar terminator propagation handbook
- Added CSS animations for earthquake pulse effects
Each README includes:
- Feature overview and capabilities
- Data sources and technical details
- Use cases and operating strategies
- Troubleshooting and best practices
- Version history and metadata
- Implement plugin registry architecture for zero-core-modification layer additions
- Add PluginLayer component for React-based plugin integration
- Create two example plugins: Weather Radar (WMS) and Earthquakes (USGS API)
- Add Settings panel controls for layer enable/disable and opacity
- Implement localStorage persistence for user preferences
- Include comprehensive developer documentation and API reference
This allows developers to add custom map layers without modifying core code.
Plugins are self-contained modules with metadata, lifecycle hooks, and cleanup.