{"id":36500249,"url":"https://github.com/novalabio/react-native-maps-super-cluster","last_synced_at":"2026-01-12T02:19:57.597Z","repository":{"id":26886850,"uuid":"110278021","full_name":"novalabio/react-native-maps-super-cluster","owner":"novalabio","description":"A Clustering-enabled map for React Native","archived":false,"fork":false,"pushed_at":"2024-10-01T09:49:21.000Z","size":89,"stargazers_count":348,"open_issues_count":9,"forks_count":123,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-11-22T23:27:50.619Z","etag":null,"topics":["clustering","maps","react-native","react-native-component"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/novalabio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-11-10T18:11:02.000Z","updated_at":"2025-11-06T19:49:08.000Z","dependencies_parsed_at":"2024-01-16T12:46:25.928Z","dependency_job_id":"7633084c-c8de-4774-a72e-f037f0945aba","html_url":"https://github.com/novalabio/react-native-maps-super-cluster","commit_stats":{"total_commits":76,"total_committers":15,"mean_commits":5.066666666666666,"dds":0.7105263157894737,"last_synced_commit":"66a9bb5e1ce86cdfcaa78289a11447b32bb198b7"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/novalabio/react-native-maps-super-cluster","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novalabio%2Freact-native-maps-super-cluster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novalabio%2Freact-native-maps-super-cluster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novalabio%2Freact-native-maps-super-cluster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novalabio%2Freact-native-maps-super-cluster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/novalabio","download_url":"https://codeload.github.com/novalabio/react-native-maps-super-cluster/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novalabio%2Freact-native-maps-super-cluster/sbom","scorecard":{"id":695570,"data":{"date":"2025-08-11","repo":{"name":"github.com/novalabio/react-native-maps-super-cluster","commit":"66a9bb5e1ce86cdfcaa78289a11447b32bb198b7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":2,"reason":"Found 5/22 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T03:34:36.780Z","repository_id":26886850,"created_at":"2025-08-22T03:34:36.780Z","updated_at":"2025-08-22T03:34:36.780Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","maps","react-native","react-native-component"],"created_at":"2026-01-12T02:19:56.502Z","updated_at":"2026-01-12T02:19:57.589Z","avatar_url":"https://github.com/novalabio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native Super Cluster\nThis module wraps [AirBnB's react-native-maps](https://github.com/airbnb/react-native-maps) and uses [MapBox's SuperCluster](https://github.com/mapbox/supercluster) as clustering engine.\n\n## Example\n\n[See the showcase application](https://github.com/novalabio/react-native-maps-super-cluster-example).\n\n\u003ccenter\u003e\n\u003cimg src=\"https://github.com/novalabio/react-native-maps-super-cluster-example/blob/master/assets/demo.gif?raw=true\" width=\"240\"\u003e\n\u003c/center\u003e\n\n## Rationale\nThis module wants to provide a stable and performing solution for maps clustering in React Native. In particular, our efforts are focused on integrating SuperCluster methods into React's state/lifecycle events, ensuring stability, compatibility and great performance.\n\n## Install\n`npm i --save react-native-maps-super-cluster`\n\n## Usage\n\n**NOTES:**\n\n* the prop `key` of the markers rendered through `renderMarker` should not be left up to React. Instead, we strongly suggest to use an `id` in order the have unique keys while still taking advantage of React's recycling\n* `ClusteredMapView` supports usual React children. Those children **won't be affected by clustering**, i.e. the behavior for those children is exactly the same as wrapping them around an [AirBnB's react-native-maps](https://github.com/airbnb/react-native-maps) instance\n* Use `onMarkerPress` event on MapView instead of using `onPress` directly on Markers whenever possibile, in particular if you have a lot of pins and clusters. Within `onMarkerPress` you have access to the marker identifier through the `event.nativeEvent` attribute, hence you should be able to do everything you would do within an `onPress` function of a Marker\n\n```JSX\nimport React, { Component } from 'react'\nimport { Marker, Callout } from 'react-native-maps'\nimport ClusteredMapView from 'react-native-maps-super-cluster'\n\nconst INIT_REGION = {\n  latitude: 41.8962667,\n  longitude: 11.3340056,\n  latitudeDelta: 12,\n  longitudeDelta: 12\n}\n\nexport default class MyClusteredMapView extends Component {\n  \n  ...\n\n  renderCluster = (cluster, onPress) =\u003e {\n    const pointCount = cluster.pointCount,\n          coordinate = cluster.coordinate,\n          clusterId = cluster.clusterId\n\n    // use pointCount to calculate cluster size scaling\n    // and apply it to \"style\" prop below\n\n    // eventually get clustered points by using\n    // underlying SuperCluster instance\n    // Methods ref: https://github.com/mapbox/supercluster\n    const clusteringEngine = this.map.getClusteringEngine(),\n          clusteredPoints = clusteringEngine.getLeaves(clusterId, 100)\n\n    return (\n      \u003cMarker coordinate={coordinate} onPress={onPress}\u003e\n        \u003cView style={styles.myClusterStyle}\u003e\n          \u003cText style={styles.myClusterTextStyle}\u003e\n            {pointCount}\n          \u003c/Text\u003e\n        \u003c/View\u003e\n        {\n          /*\n            Eventually use \u003cCallout /\u003e to\n            show clustered point thumbs, i.e.:\n            \u003cCallout\u003e\n              \u003cScrollView\u003e\n                {\n                  clusteredPoints.map(p =\u003e (\n                    \u003cImage source={p.image}\u003e\n                  ))\n                }\n              \u003c/ScrollView\u003e\n            \u003c/Callout\u003e\n\n            IMPORTANT: be aware that Marker's onPress event isn't really consistent when using Callout.\n           */\n        }\n      \u003c/Marker\u003e\n    )\n  }\n\n  renderMarker = (data) =\u003e \u003cMarker key={data.id || Math.random()} coordinate={data.location} /\u003e\n\n  ...\n\n  render() {\n    return (\n      \u003cClusteredMapView\n        style={{flex: 1}}\n        data={this.state.data}\n        initialRegion={INIT_REGION}\n        ref={(r) =\u003e { this.map = r }}\n        renderMarker={this.renderMarker}\n        renderCluster={this.renderCluster} /\u003e\n    )\n  }\n}\n```\n\n## Props\n\n**Name** | **Type** | **Required** | **Default** | **Note**\n---------|----------|--------------|-------------|---------\nradius | Number | false | window width * 4,5% | [SuperCluster radius](https://github.com/mapbox/supercluster#options).\nextent | Number | false | 512 | [SuperCluster extent](https://github.com/mapbox/supercluster#options).\nminZoom | Number | false | 1 | [SuperCluster minZoom](https://github.com/mapbox/supercluster#options).\nmaxZoom | Number | false | 16 | [SuperCluster maxZoom](https://github.com/mapbox/supercluster#options).\nwidth | Number | false | window width | map's width.\nheight | Number | false | window height | map's height.\ndata | Array \u003cObject\u003e | true | undefined | Objects must have an attribute `location` representing a `GeoPoint`, i.e. `{ latitude: x, longitude: y }`.\nonExplode | Function | false | undefined | TODO\nonImplode | Function | false | undefined | TODO\nonClusterPress(clusterId, ?children) | Function | false |  | Add (or completey override) behaviours to the clusterPress handler. `children` is passed when default behavior is preserved (see `preserveClusterPressBehavior` prop).\npreserveClusterPressBehavior | Bool | false | true | Whether `onClusterPress` prop should completely override module's behavior rather than integrate it.\nclusterPressMaxChildren | Function | false | 100 | Max number of cluster leaves returned as second parameter of `onClusterPress`.\nedgePadding | Object | false | { top: 10, left: 10, bottom: 10, right: 10 } | Edge padding for [react-native-maps's](https://github.com/react-community/react-native-maps/blob/master/docs/mapview.md#methods) `fitToCoordinates` method, called in `onClusterPress` for fitting to pressed cluster children.\nrenderMarker | Function | false | undefined | Must return a react-native-maps' Marker component.\nanimateClusters | Bool | false | true | Animate imploding/exploding of clusters' markers and clusters size change. **Works only on iOS**.\nlayoutAnimationConf | LayoutAnimationConfig | false | `LayoutAnimation.Presets.spring` | Custom Layout animation configuration object for clusters animation during implode / explode **Works only on iOS**.\nclusteringEnabled | Bool | false | true | Dynamically set whether to pass through clustering functions or immediately render markers as a normal mapview.\naccessor | String\\|Func | true | \"location\" | Accessor for item coordinate values. Could be a **string** (field name of an item object with latitude and longitude values) or a **function** (that describes how to access to coordinate data).\n\n## Methods\n**Name** | **Params** | **Description** | **Note**\n---------|------------|-----------------|---------\ngetMapRef | none | Getter for underlying react-native-maps instance | [Official Doc](https://github.com/react-community/react-native-maps#component-api)\ngetClusteringEngine | none | Getter for underlying SuperCluster instance | [Official Doc](https://github.com/mapbox/supercluster)\n\n## Production usage\nIf you are using this module in a production application, please submit a PR or contact us to add it here.\n* [Varee on Google Play](https://play.google.com/store/apps/details?id=com.vareemobile)\n* [Varee on App Store](https://itunes.apple.com/us/app/varee/id1330151010?mt=8)\n* [Our Voice USA on Google Play](https://play.google.com/store/apps/details?id=org.ourvoiceinitiative.ourvoice)\n* [Our Voice USA on App Store](https://itunes.apple.com/us/app/our-voice-usa/id1275301651?ls=1\u0026mt=8)\n* [Metropolíque on Google Play](https://play.google.com/store/apps/details?id=com.metropolique.app)\n* [Metropolíque on App Store](https://itunes.apple.com/us/app/metropolique/id1314473652?ls=1\u0026mt=8)\n* [Outside - Post and do tasks! on Google Play](https://play.google.com/store/apps/details?id=com.outsideapp)\n* [Outside - Post and do tasks! on App Store](https://itunes.apple.com/us/app/outside-post-and-do-tasks/id1444603208?ls=1\u0026mt=8)\n* [Luceverde - ACI Infomobilità on Google Play](https://play.google.com/store/apps/details?id=it.aci.luceverde.client.mobileapp)\n* [Luceverde - ACI Infomobilità on App Store](https://itunes.apple.com/it/app/luceverde/id1357722780?l=en\u0026mt=8)\n* [Own The Spot on Google Play](https://play.google.com/store/apps/details?id=com.ownthespot)\n* [Own The Spot on App Store](https://itunes.apple.com/us/app/own-the-spot/id1403095767)\n\n## TODO\n\n#### features\n* improve `scaleUpRatio` math for fontSize\n* trigger events on cluster implode/explode\n\n# Support\nAs an open source project, we provide free support over Github. However, our daily job may increase response time to days or even weeks. If you need dedicated support, feel free to [contact us](mailto:info@novalab.io) for a quote.\n\n# Contributors\n\n* [Leonardo Lusoli](https://github.com/leolusoli)\n* [Alberto Dallaporta](https://github.com/39otrebla)\n\n# License\nSee [our License](https://github.com/novalabio/react-native-maps-super-cluster/blob/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovalabio%2Freact-native-maps-super-cluster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnovalabio%2Freact-native-maps-super-cluster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovalabio%2Freact-native-maps-super-cluster/lists"}