# react-native-map-clustering-flex

> React Native Map Clustering both for Android and iOS

Latest version **3.5.2** (published 2024-02-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-map-clustering-flex
pnpm add react-native-map-clustering-flex
yarn add react-native-map-clustering-flex
bun add react-native-map-clustering-flex
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.5.2 |
| Published | 2024-02-15 |
| First published | 2024-02-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 28.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ddrr1337 |
| Maintainers | ddrr1337 |
| Keywords | react-native, react, cluster, android, iOS, map, clustering |

## Links

- npm: https://www.npmjs.com/package/react-native-map-clustering-flex
- Repository: https://github.com/ddrr1337/react-native-map-clustering-flex
- Homepage: https://github.com/ddrr1337/react-native-map-clustering-flex#readme
- Issues: https://github.com/ddrr1337/react-native-map-clustering-flex/issues
- npm.io page: https://npm.io/package/react-native-map-clustering-flex

## Dependencies (2)

- [supercluster](https://npm.io/package/supercluster.md) ^7.1.0
- [@mapbox/geo-viewport](https://npm.io/package/@mapbox/geo-viewport.md) ^0.4.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 3.5.2 (latest) — 2024-02-15
- 3.5.1 — 2024-02-13

## README

# React Native Map Clustering Flex

**Note: This is a modification of react-native-map-clustering package to allow passing a list of markers that should not be clustered.**

This modification allows you to pass a new prop `notToCluster` with keys of markers you don't want to cluster. This won't prevent the Marker to show, but will prevent to be wrapped into a cluster.

## Props

| Name           | Type  | Default | Note                                           |
| -------------- | ----- | ------- | ---------------------------------------------- |
| `notToCluster` | Array | []      | Pass the marker keys you don't want to cluster |

## Full Example

```jsx
import React from "react";
import MapView from "react-native-map-clustering-flex";
import { Marker } from "react-native-maps";

const INITIAL_REGION = {
  latitude: 52.5,
  longitude: 19.2,
  latitudeDelta: 8.5,
  longitudeDelta: 8.5,
};

const App = () => (
  <MapView
    initialRegion={INITIAL_REGION}
    style={{ flex: 1 }}
    notToCluster={["dontClusterMe", "dontClusterMeToo"]}
  >
    <Marker coordinate={{ latitude: 52.4, longitude: 18.7 }} />
    <Marker coordinate={{ latitude: 52.1, longitude: 18.4 }} />
    <Marker coordinate={{ latitude: 52.6, longitude: 18.3 }} />
    <Marker coordinate={{ latitude: 51.6, longitude: 18.0 }} />
    <Marker coordinate={{ latitude: 53.1, longitude: 18.8 }} />
    <Marker coordinate={{ latitude: 52.9, longitude: 19.4 }} />
    <Marker coordinate={{ latitude: 52.2, longitude: 21 }} />
    <Marker coordinate={{ latitude: 52.4, longitude: 21 }} />
    <Marker coordinate={{ latitude: 51.8, longitude: 20 }} />
    <Marker
      key={"dontClusterMe"}
      coordinate={{ latitude: 51.9, longitude: 21.2 }}
    />
    <Marker
      key={"dontClusterMeToo"}
      coordinate={{ latitude: 52.1, longitude: 21.4 }}
    />
  </MapView>
);

export default App;
```

---
_Source: https://npm.io/package/react-native-map-clustering-flex · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
