diff --git a/src/components/WorldMap.jsx b/src/components/WorldMap.jsx index 11e8843..4f93e95 100644 --- a/src/components/WorldMap.jsx +++ b/src/components/WorldMap.jsx @@ -417,20 +417,33 @@ export const WorldMap = ({ if (showPOTA && potaSpots) { potaSpots.forEach(spot => { if (spot.lat && spot.lon) { - const icon = L.divIcon({ + // Green triangle marker for POTA activators + const triangleIcon = L.divIcon({ className: '', - html: `${spot.call}`, - iconSize: null, - iconAnchor: [0, 0] + html: ``, + iconSize: [14, 14], + iconAnchor: [7, 14] }); - const marker = L.marker([spot.lat, spot.lon], { icon }) - .bindPopup(`${spot.call}
${spot.ref}
${spot.freq} ${spot.mode}`) + const marker = L.marker([spot.lat, spot.lon], { icon: triangleIcon }) + .bindPopup(`${spot.call}
${spot.ref}
${spot.freq} ${spot.mode}`) .addTo(map); potaMarkersRef.current.push(marker); + + // Only show callsign label when labels are enabled + if (showDXLabels) { + const labelIcon = L.divIcon({ + className: '', + html: `${spot.call}`, + iconSize: null, + iconAnchor: [0, -2] + }); + const label = L.marker([spot.lat, spot.lon], { icon: labelIcon, interactive: false }).addTo(map); + potaMarkersRef.current.push(label); + } } }); } - }, [potaSpots, showPOTA]); + }, [potaSpots, showPOTA, showDXLabels]); // Update satellite markers with orbit tracks useEffect(() => { @@ -864,7 +877,7 @@ export const WorldMap = ({ {showPOTA && (
- ● POTA + ▲ POTA
)}
diff --git a/src/utils/geo.js b/src/utils/geo.js index 8ce24e8..0557e22 100644 --- a/src/utils/geo.js +++ b/src/utils/geo.js @@ -130,9 +130,9 @@ export const getMoonPosition = (date) => { export const getMoonPhase = (date) => { const JD = date.getTime() / 86400000 + 2440587.5; const T = (JD - 2451545.0) / 36525; - const D = (297.850 + 445267.1115 * T) % 360; // Mean elongation - // Phase angle (simplified) - const phase = ((D + 180) % 360) / 360; + const D = (297.850 + 445267.1115 * T) % 360; // Mean elongation: 0=new, 180=full + // Map to phase: 0=new, 0.5=full, 1=new again + const phase = (((D % 360) + 360) % 360) / 360; return phase; };