Skip to main content

Clusterer

Clusterer groups multiple markers close to each other on a map into a single cluster. Clusters are created automatically based on config and map zoom level.

Clustering is a functionality added to individual marker layer. That meaning Clusterer component has to be a child of MarkerLayer component.

How to use it

import { MapProvider, Map, MarkerLayer, Clusterer } from 'mapy-cz-react';

<MapProvider center={{ lat: 50.096406, lng: 14.463071 }} id="map-example">
<Map>
<MarkerLayer>
<Clusterer />
...Some Marker or MultipleMarkers component
</MarkerLayer>
</Map>
</MapProvider>;

Props

NameTypeDefaultDescriptionRequired
maxDistancenumber100Distance in which point is included into cluster

Example

Live Editor
Result
Loading...