🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

pigeon-maps-cluster

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pigeon-maps-cluster

[![npm version](https://img.shields.io/npm/v/pigeon-maps-cluster.svg)](https://www.npmjs.com/package/pigeon-maps-cluster) [![minified](https://img.shields.io/bundlephobia/min/pigeon-maps-cluster)](https://bundlephobia.com/result?p=pigeon-maps-cluster) [![

1.0.8
latest
Source
npm
Version published
Weekly downloads
52
26.83%
Maintainers
1
Weekly downloads
 
Created
Source

Cluster component for pigeon-maps

npm version minified minified + gzipped

$ npm install pigeon-maps-cluster --save
import { Map, Marker } from "pigeon-maps";
import { Cluster } from "pigeon-maps-cluster";

const coordinates = [
    [lat,lng],
    [lat,lng],
    [lat,lng]
    ...
]

<Map center={[55.753544, 37.621202]}
     zoom={4}
     width={600}
     height={400}>
    <Cluster>
        {
            coordinates.map(coordinate => <Marker key={coordinate.toString()} anchor={coordinate} />)
        }
    </Cluster>
</Map>

Options

OptionTypeDefaultDescription
minZoomnumber0Minimum zoom level at which clusters are generated.
maxZoomnumber16Maximum zoom level at which clusters are generated.
minPointsnumber2Minimum number of points to form a cluster.
clusterMarkerRadiusnumber40Cluster radius, in pixels. Used for generating cluster and for default cluster size.
onClick(data: ClusterData) => voidundefinedFunction that is called when cluster is clicked.
clusterStyleFunction(pointCount: number, markerPixelOffset?: [number, number]) => CSSPropertiesundefinedFunction that can help you to modify default cluster view.
clusterRenderFunction(pointCount: number, markerPixelOffset?: [number, number]) => ReactElementundefinedFunction that can help you to create your own cluster (ignores clusterStyleFunction).
classNamestringundefinedCluster container className.

Keywords

pigeon-maps

FAQs

Package last updated on 25 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts