import { LatLng } from 'leaflet'; import { default as Supercluster, ClusterProperties, PointFeature } from 'supercluster'; import { GenericDataRecord } from '../../types/data'; export declare enum LeafletMapRenderer { Raster = "raster", MapLibre = "maplibre" } export declare enum LeafletMapPointShape { Square = "square", Circle = "circle", Triangle = "triangle", Ring = "ring" } export type LeafletMapPieDatum = { value: number; name: string; color: string; className?: string; }; export interface LeafletMapPointStyle { color: string; className?: string; } export type LeafletMapPointStyles = { [key in keyof D]?: LeafletMapPointStyle; }; export type PointExpandedClusterProperties = D & { expandedClusterPoint?: LeafletMapPoint; r?: number; dx?: number; dy?: number; }; export type LeafletMapClusterDatum = Partial & ClusterProperties & { clusterIndex?: Supercluster; clusterPoints?: D[]; }; export type LeafletMapPointDatum = D & PointExpandedClusterProperties & { id: string | number; shape: LeafletMapPointShape; _index: number; }; export type LeafletMapPoint = { geometry: GeoJSON.Point; bbox: { x1: number; x2: number; y1: number; y2: number; }; radius: number; path: string; color: string; id: number | string; properties: LeafletMapPointDatum | LeafletMapClusterDatum; donutData: LeafletMapPieDatum[]; isCluster: boolean; clusterIndex: Supercluster; clusterPoints?: D[]; _zIndex: number; }; export type Bounds = { northEast: { lat: number; lng: number; }; southWest: { lat: number; lng: number; }; }; export type MapZoomState = { mapCenter: LatLng; zoomLevel: number; bounds: Bounds; userDriven: boolean; }; export type LeafletMapExpandedCluster = { points: PointFeature>[]; cluster: LeafletMapPoint; };