{"id":22196806,"url":"https://github.com/turtiesocks/react-leaflet-supercluster","last_synced_at":"2025-07-27T01:30:44.580Z","repository":{"id":199799351,"uuid":"703877756","full_name":"TurtIeSocks/react-leaflet-supercluster","owner":"TurtIeSocks","description":"Wrapper for the Supercluster library to work with React Leaflet","archived":false,"fork":false,"pushed_at":"2023-11-02T19:39:38.000Z","size":49,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-10T04:31:18.670Z","etag":null,"topics":["clustering","leaflet","markercluster","markers","react","react-leaflet","supercluster"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TurtIeSocks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"TurtIeSocks"}},"created_at":"2023-10-12T05:18:25.000Z","updated_at":"2023-10-14T20:16:46.000Z","dependencies_parsed_at":"2023-11-19T12:44:48.574Z","dependency_job_id":null,"html_url":"https://github.com/TurtIeSocks/react-leaflet-supercluster","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"9a3187db6870c9b3b30a009a93247f692b233919"},"previous_names":["turtiesocks/react-leaflet-supercluster"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TurtIeSocks%2Freact-leaflet-supercluster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TurtIeSocks%2Freact-leaflet-supercluster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TurtIeSocks%2Freact-leaflet-supercluster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TurtIeSocks%2Freact-leaflet-supercluster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TurtIeSocks","download_url":"https://codeload.github.com/TurtIeSocks/react-leaflet-supercluster/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227740670,"owners_count":17812687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clustering","leaflet","markercluster","markers","react","react-leaflet","supercluster"],"created_at":"2024-12-02T14:16:33.354Z","updated_at":"2024-12-02T14:16:34.233Z","avatar_url":"https://github.com/TurtIeSocks.png","language":"TypeScript","funding_links":["https://github.com/sponsors/TurtIeSocks"],"categories":[],"sub_categories":[],"readme":"# react-leaflet-supercluster\n\n[![npm version](https://badge.fury.io/js/react-leaflet-supercluster.svg)](https://badge.fury.io/js/react-leaflet-supercluster)\n\nBasic React Leaflet wrapper for the fantastic [Supercluster](https://github.com/mapbox/supercluster) library.\n\n## Installation\n\n```sh\n  // npm\n  npm i react-leaflet-supercluster\n\n  // yarn\n  yarn add react-leaflet-supercluster\n```\n\n## Supported Components\n\n- [Marker](https://react-leaflet.js.org/docs/api-components/#marker)\n- [Circle](https://react-leaflet.js.org/docs/api-components/#circle)\n- [CircleMarker](https://react-leaflet.js.org/docs/api-components/#circlemarker)\n- [Polyline](https://react-leaflet.js.org/docs/api-components/#polyline)\n- [Rectangle](https://react-leaflet.js.org/docs/api-components/#rectangle)\n- [Polygon](https://react-leaflet.js.org/docs/api-components/#polygon)\n- [GeoJSON](https://react-leaflet.js.org/docs/api-components/#geojson)\n\n## Usage\n\nThis package primarily exports a React component that can be used anywhere as a child of a `MapContainer` component. It also provides a \"low level\" hook that just returns a Supercluster instance. See the [Example](/example) code for a more detailed usage example.\n\n```tsx\nimport 'react-leaflet-supercluster/src/styles.css'\nimport { MapContainer, Circle, CircleMarker, Marker Polygon, Polyline } from 'react-leaflet'\nimport { SuperClustering } from 'react-leaflet-supercluster'\n\nexport default function App() {\n  return (\n    \u003cMapContainer\u003e\n      \u003cSuperClustering\u003e\n        \u003cCircle center={[0, 0]} /\u003e\n        \u003cMarker position={[1, 2]} /\u003e\n        \u003cCircleMarker position={[3, 4]} /\u003e\n        \u003cPolyline positions={[3, 4]} /\u003e\n        \u003cPolygon positions={[5, 6]} /\u003e\n      \u003c/SuperClustering\u003e\n    \u003c/MapContainer\u003e\n  )\n}\n```\n\n## Props\n\nExtends all original options from the [Supercluster constructor](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/409c8137e9849a496f859baa2a45afff5a162b16/types/supercluster/index.d.ts#L13).\n\n### Additional props:\n| Prop | Type | Default | Description |\n| --- | --- | --- | --- |\n| children | ReactNode |  | Marker, Circle, CircleMarker, Polyline, Polygon, \u0026 GeoJSON components |\n| disableZoomEvent | boolean | false | Disable reclustering on `zoomend` event |\n| disableMoveEvent | boolean | false | Disable reclustering on `moveend` event |\n| pointToLayer | (feature, latlng) =\u003e Marker | See code | Function that will be used for creating cluster markers. |\n| markerFilter | (ReactNode, number, boolean[]) =\u003e boolean | (_, index, markers) =\u003e markers[index] | Function that will be used for filtering markers that were not included in clusters. |\n\n\n## Contributing\n\n- `yarn start` to start the Vite dev server with HMR enabled.\n- With VS Code you can open a debugger in Chrome for IDE debugging\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturtiesocks%2Freact-leaflet-supercluster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturtiesocks%2Freact-leaflet-supercluster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturtiesocks%2Freact-leaflet-supercluster/lists"}