UNPKG

690 BTypeScriptView Raw
1import Supercluster from "supercluster";
2import { BBox, GeoJsonProperties } from "geojson";
3export interface UseSuperclusterArgument<P, C> {
4 points: Array<Supercluster.PointFeature<P>>;
5 bounds?: BBox;
6 zoom: number;
7 options?: Supercluster.Options<P, C>;
8}
9declare const useSupercluster: <P extends GeoJsonProperties = Supercluster.AnyProps, C extends GeoJsonProperties = Supercluster.AnyProps>({ points, bounds, zoom, options }: UseSuperclusterArgument<P, C>) => {
10 clusters: (Supercluster.PointFeature<P> | Supercluster.PointFeature<Supercluster.ClusterProperties & C>)[];
11 supercluster: Supercluster<P, C> | undefined;
12};
13export default useSupercluster;