react-map-gl-supercluster
Version:
> The easiest way to get `react-map-gl` and `supercluster` to work together
15 lines (14 loc) • 445 B
JavaScript
import { n as create, t as isCluster } from "./is-cluster-DbiOEN13.js";
import { useMap } from "react-map-gl/maplibre";
//#region src/exports-maplibre.ts
/**
* React hook that clusters points for the current MapLibre map viewport.
*
* @example
* ```tsx
* const { clusters, supercluster } = useSupercluster(points, { radius: 60 })
* ```
*/
const useSupercluster = /*@__PURE__*/ create(useMap);
//#endregion
export { isCluster, useSupercluster };