Interface ClusterRendererExperimental

Cluster renderer object.

interface ClusterRenderer {
    kind: "cluster";
    legendItems(): readonly RendererLegendItem[];
    toJSON(): ClusterRendererDescriptor;
    toMapLibre(geometry: RendererGeometryType): readonly RendererLayerFragment[];
    toMapLibreSource(): Record<string, unknown>;
}

Hierarchy

Properties

kind

Methods

  • Experimental

    GeoJSON source options enabling MapLibre-native clustering (cluster, clusterRadius, clusterMaxZoom, clusterProperties). Merge these into the GeoJSON source spec that feeds the layers.

    Returns Record<string, unknown>