React Native Map Clustering
React Native module that handles map clustering for you.
Works with Expo and react-native-cli.
Installation
Usage
- Import Components
- In render() method add this:
Demo
MapView
Name | Type | Default | Note |
---|---|---|---|
clustering | bool | true | Set true to enable and false to disable clustering. |
clusterColor | String | #F5F5F5 | Background color of cluster. |
clusterTextColor | String | #FF5252 | Color of text in cluster. |
clusterBorderColor | String | #FF5252 | Color of border. Set to transparent if you don't want borders. |
clusterBorderWidth | Int | 1 | Width of border. Set to 0 if you don't want borders. |
customDefinedMarker | Marker | null | Define a custom react component that is used to render the cluster markers. |
onClusterPress | Function | null | Allows you to control cluster on click event. Function returns coordinate of cluster. |
Marker
Name | Type | Default | Note |
---|---|---|---|
cluster | bool | null | Set false to disable clustering for current marker. |