Skip to content

Real-time dashboard for monitoring global news, markets, and geopolitical events

TypeScript

Add debug logging to identify map loading issue

Reggie052ddecb3b97
diff --git a/js/main.js b/js/main.js
index e843033..3909c79 100644
--- a/js/main.js
+++ b/js/main.js
@@ -75,6 +75,7 @@ window.showAircraftPopup = showAircraftPopup;
// Staged refresh - loads critical data first for faster perceived startup
async function refreshAll() {
+ console.log('refreshAll started');
const btn = document.getElementById('refreshBtn');
if (btn) btn.disabled = true;
setStatus('Loading critical...', true);
@@ -124,7 +125,9 @@ async function refreshAll() {
// Render map with earthquakes and shipping alert data
if (isPanelEnabled('map')) {
+ console.log('Starting map render, earthquakes:', earthquakes?.length);
const activityData = analyzeHotspotActivity(allNews);
+ console.log('Activity data ready, calling renderGlobalMap');
await renderGlobalMap(
activityData,
earthquakes,
@@ -135,6 +138,9 @@ async function refreshAll() {
classifyAircraft,
getAircraftArrow
);
+ console.log('renderGlobalMap completed');
+ } else {
+ console.log('Map panel disabled');
}
if (isPanelEnabled('mainchar')) {
const mainCharRankings = calculateMainCharacter(allNews);