rs-react-native-map-clustering
Version:
React Native Map Clustering both for Android and iOS with TypeScript support
18 lines (17 loc) • 857 B
TypeScript
import { Region } from './helpers';
import { ClusterFeature } from './types';
/**
* Utility for handling large marker datasets with virtual windowing
* Only processes markers that are within the visible region or just outside it
*/
export declare const windowMarkers: (markers: ClusterFeature[], region: Region, bufferFactor?: number) => ClusterFeature[];
/**
* Chunk processing for very large marker arrays
* Processes large arrays in smaller chunks to avoid UI blocking
*/
export declare const processInChunks: <T, R>(items: T[], processor: (item: T) => R, chunkSize?: number) => Promise<R[]>;
/**
* Returns a function that can be used to efficiently test if a point (marker)
* is within the current visible map bounds
*/
export declare const createBoundsChecker: (region: Region, bufferFactor?: number) => (lat: number, lng: number) => boolean;