This is the documentation of version 1.0.0-rc.2. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Type Alias PlaceClusterBadgeConfig

    Appearance of the cluster count badge under the pin-clustered marker type.

    Each field applies to single-category and mixed-category clusters alike. The matching PlaceLayersConfig entry (clusterBadge, clusterCount, clusterMixedBadge, clusterMixedCount) overrides it for the paint and layout properties it names.

    type PlaceClusterBadgeConfig = {
        color?: DataDrivenPropertyValueSpecification<string>;
        label?: Pick<LabelConfig, "color" | "size">;
        offset?: [number, number];
        outlineColor?: DataDrivenPropertyValueSpecification<string>;
        outlineWidth?: DataDrivenPropertyValueSpecification<number>;
        radius?: { mixed?: number; single?: number };
    }
    Index
    color?: DataDrivenPropertyValueSpecification<string>

    Badge fill color.

    '#000000'
    
    label?: Pick<LabelConfig, "color" | "size">

    The count inside the badge.

    color defaults to '#FFFFFF' and size to 12 pixels.

    offset?: [number, number]

    Offset of the single-category badge from the cluster icon, in viewport pixels.

    Applied to the badge circle and the count text together so they can't drift apart. Mixed-category clusters are always centred and ignore this.

    [12, -14]
    
    outlineColor?: DataDrivenPropertyValueSpecification<string>

    Badge outline color.

    '#FFFFFF'
    
    outlineWidth?: DataDrivenPropertyValueSpecification<number>

    Badge outline width in pixels.

    1.5
    
    radius?: { mixed?: number; single?: number }

    Badge radius in pixels, per cluster kind.

    single is the small badge in the corner of a single-category cluster's icon. mixed is the centred badge that replaces the icon entirely for mixed-category clusters, so it defaults larger.

    { single: 11, mixed: 15 }