Options
All
  • Public
  • Public/Protected
  • All
Menu

The cluster manager.

Type Parameters

  • T

    The type of a point

Hierarchy

  • ClusterManager

Index

Constructors

Methods

Constructors

  • Create a cluster manager.

    Type Parameters

    • T

      The type of a point

    Parameters

    • points: T[]

      An array of points.

    • getCoordinate: ((data: T) => Coordinate)

      A function to return the coordinate of a point.

    • pointFactory: ((coordinate: Coordinate, nodes: Node<T>[]) => T)

      A function to return the point for a cluster node.

    • options: Partial<Options> = {}

      Options to control the cluster generation.

    Returns ClusterManager<T>

Methods

  • Gets the cluster data for a particular area and zoom level.

    Parameters

    • bounds: CoordinateBounds

      The area for which to return nodes.

    • zoom: number

      The zoom level.

    Returns Node<T>[]

    An array of nodes.

Generated using TypeDoc