diff --git a/src/app/admin/admin-stats-dashboard.component.ts b/src/app/admin/admin-stats-dashboard.component.ts index e2f9633..128b045 100644 --- a/src/app/admin/admin-stats-dashboard.component.ts +++ b/src/app/admin/admin-stats-dashboard.component.ts @@ -189,6 +189,14 @@ export class AdminStatsDashboardComponent implements OnInit, AfterViewChecked, O async loadAll(): Promise { this.loading = true; this.error = null; + + // Destroy existing map so it re-initializes on the new DOM element + // created when loading flips back to false. + if (this.map) { + this.map.remove(); + this.map = null; + } + this.mapInitialized = false; const { start, end } = this.getDates(); try { const [summary, timeSeries, geoStats] = await Promise.all([