npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-map-supercluster

v1.0.4

Published

Customizable clustering component for react-native-maps using SuperCluster. . Based on the original react-native-map-clustering by @tomekvenits.

Readme

react-native-map-supercluster

A lightweight, dependency-minimized library for clustering markers on react-native-maps. Built as a modern alternative and continuation of the now unmaintained react-native-map-clustering.

npm version MIT License Downloads


Features

  • Smooth marker clustering and rendering
  • Minimal setup, no native linking required
  • Fully compatible with react-native-maps
  • Support for color ranges and customization
  • Native performance via supercluster with no external geo dependencies

Installation

npm install react-native-map-supercluster

or with yarn:

yarn add react-native-map-supercluster

You also need react-native-maps installed and configured in your project.


Usage

import React, { useState } from "react";
import { StyleSheet, View } from "react-native";
import { Marker } from "react-native-maps";
import ClusteredMapView from "react-native-map-supercluster";

const markers = [
  <Marker key="1" coordinate={{ latitude: -19.92, longitude: -43.94 }} />,
  <Marker key="2" coordinate={{ latitude: -19.93, longitude: -43.95 }} />,
  <Marker key="3" coordinate={{ latitude: -19.91, longitude: -43.96 }} />,
];

export default function App() {
  return (
    <View style={{ flex: 1 }}>
      <ClusteredMapView
        initialRegion={{
          latitude: -19.92,
          longitude: -43.94,
          latitudeDelta: 0.1,
          longitudeDelta: 0.1,
        }}
        style={StyleSheet.absoluteFillObject}
      >
        {markers}
      </ClusteredMapView>
    </View>
  );
}

Props

| Prop | Type | Default | Description | | ------------------------------ | ------------------------------ | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | clusteringEnabled | boolean | true | Enable or disable clustering. | | spiralEnabled | boolean | true | Enable spiderfy behavior when overlapping markers. | | animationEnabled | boolean | true | Enable layout animation when clusters update. | | preserveClusterPressBehavior | boolean | false | If true, clusters will not zoom in on press unless explicitly handled. | | layoutAnimationConf | LayoutAnimationConfig | — | Custom layout animation config. | | tracksViewChanges | boolean | false | Set on Marker components for performance. | | useAndroidColorScale | boolean | false | ⚠️ Important for Android: If your custom cluster components (e.g. SVG, View) are being clipped or cut off, set this to true. This disables custom cluster rendering and instead uses the default static image cluster. | | radius | number | 50 | Cluster radius. | | maxZoom | number | 20 | Maximum zoom level to cluster. | | minZoom | number | 1 | Minimum zoom level to cluster. | | minPoints | number | 2 | Minimum number of points to form a cluster. | | extent | number | 512 | Tile extent (usually remains at 512). | | nodeSize | number | 64 | Node size for supercluster. | | edgePadding | object | { top: 50, left: 50, right: 50, bottom: 50 } | Padding used when fitting to cluster bounds. | | clusterColor | string | #00B386 | Default background color of clusters. | | clusterTextColor | string | #FFFFFF | Default text color inside cluster. | | clusterFontFamily | string | — | Font family to apply to cluster text. | | spiderLineColor | string | #FF0000 | Color of spiderfy lines when a cluster is expanded. | | selectedClusterId | string | — | Highlight a specific cluster. | | selectedClusterColor | string | — | Color to use for the selected cluster. | | superClusterRef | React.MutableRefObject | { current: null } | Get direct access to the SuperCluster instance. | | mapRef | React.Ref<Map> | — | Expose MapView reference. | | onClusterPress | (cluster, markers) => void | () => {} | Called when a cluster is pressed. | | onRegionChangeComplete | (region) => void | () => {} | Triggered when map region changes. | | onMarkersChange | (markers) => void | () => {} | Triggered when visible markers change. | | getClusterEngine | (engine) => void | — | Returns the raw supercluster engine. | | renderCluster | (cluster) => React.ReactNode | — | Provide a custom cluster renderer. |


Expo Support

🚨 Warning: Due to current architectural limitations in Expo Go, dynamic cluster rendering may result in crashes or unresponsiveness. We recommend using React Native CLI for production apps. A future update may introduce Expo compatibility.

Credits

This package is based on react-native-map-clustering by @tomekvenits. Since that library is no longer maintained, we adapted its original codebase — fixing compatibility issues (especially with the new React Native architecture), resolving Android-specific bugs, and introducing a few enhancements to improve flexibility and ease of use.


License

MIT © 2025 [Luís-Reis]