/** * Maps Feature - Lazy Loading Entry Point * * This module handles lazy loading of map-related libraries (Leaflet, MapLibre GL, H3). * These libraries are large (~1MB combined) so we only load them when needed. */ /** * Initialize the event map if its container exists. */ export async function initEventMap(): Promise { const container = document.getElementById('event-map') if (!container) return const { initEventMap: init } = await import('./event-map') await init() } /** * Initialize the globe map if its container exists. */ export async function initGlobeMap(): Promise { const container = document.getElementById('globe-map') if (!container) return const { initGlobeMap: init } = await import('./globe-map') await init() } /** * Initialize the location heatmap if its container exists. */ export async function initLocationHeatmap(): Promise { const container = document.getElementById('location-heatmap') if (!container) return const { initLocationHeatmap: init } = await import('./location-heatmap') await init() } /** * Initialize all maps on the page. * Call this when map containers exist on the page. */ export function initMaps(): void { // These functions check for their container elements internally initEventMap() initGlobeMap() initLocationHeatmap() }