MarkerClusterer
<MarkerClusterer />
component is used for combine markers of close proximity into clusters, and simplify the display of markers on the map.
MarkerClusterer
is based on @googlemaps/markerclusterer. for more detail, see our MarkerClusterer example or official library documentation.
Basic Example
Props
props are the same as MarkerClustererOptions. (
map
andmarkers
are automatically filled)
we highly recommend memorizing props. If you don’t, MarkerClusterer
will be re-created every time.
Props | Type | Description |
---|---|---|
algorithmOptions | AlgorithmOptions | An options for Algorithm. |
algorithm | Algorithm | An algorithm to cluster markers. Default is SuperClusterAlgorithm. |
renderer | Renderer | An object that converts a Cluster into a google.maps.Marker . |
onClusterClick | (event: google.maps.MapMouseEvent, cluster: Cluster, map: google.maps.Map) => void | callback for click evnet. |