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