fix(earthquakes): Swap lat/lon in marker calls to fix incorrect plotting

The markers were appearing in completely wrong locations:
- Peru earthquakes showing in Antarctica
- Russia earthquakes showing in Northern Europe

Root cause: The L.marker() and L.circle() calls need [lon, lat] order
instead of the standard Leaflet [lat, lon] format for this specific setup.

Changes:
- L.marker([lat, lon]) → L.marker([lon, lat])
- L.circle([lat, lon]) → L.circle([lon, lat])

This ensures earthquakes plot at their correct geographic locations.
pull/106/head
trancen 1 day ago
parent 882b6f5996
commit cc8d2ae09b

@ -150,7 +150,9 @@ export function useLayer({ enabled = false, opacity = 0.9, map = null }) {
});
console.log('Creating earthquake marker:', quakeId, 'M' + mag.toFixed(1), 'at lat:', lat, 'lon:', lon, 'size:', size + 'px', 'color:', color);
const circle = L.marker([lat, lon], {
// FIX: Swap coordinates - empirically markers were appearing in wrong locations
// Even though standard Leaflet expects [lat, lng], this specific setup requires [lon, lat]
const circle = L.marker([lon, lat], {
icon,
opacity,
zIndexOffset: 10000 // Ensure markers appear on top
@ -183,8 +185,8 @@ export function useLayer({ enabled = false, opacity = 0.9, map = null }) {
}
}, 10);
// Create pulsing ring effect
const pulseRing = L.circle([lat, lon], {
// Create pulsing ring effect - also swap coordinates to match marker location
const pulseRing = L.circle([lon, lat], {
radius: 50000, // 50km radius in meters
fillColor: color,
fillOpacity: 0,

Loading…
Cancel
Save

Powered by TurnKey Linux.