Package Exports
- use-supercluster
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (use-supercluster) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
useSupercluster
A hook for using Supercluster with React.
const { clusters, supercluster } = useSupercluster({
points: [],
bounds: [
-1.2411810957931664,
52.61208435908725,
-1.0083656811012531,
52.64495957533833
],
zoom: 12,
options: { radius: 75, maxZoom: 20 }
});Installation
You will need to install supercluster as a peer dependency of this package.
yarn add supercluster use-superclusterExamples
This package contains an example along with tests, but full examples with instructions in the most popular mapping libraries for React can be found below.
Mapbox
Full instructions and an example can be found here.
Google Maps
Full instructions and an example can be found here.
Leaflet
Full instructions and an example can be found here.