UNPKG

react-map-gl-supercluster

Version:

> The easiest way to get `react-map-gl` and `supercluster` to work together

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