This is the documentation of version 0.63.0. Go to the latest version, 1.0.0.
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];
        radius?: { mixed?: number; single?: number };
        strokeColor?: DataDrivenPropertyValueSpecification<string>;
        strokeWidth?: DataDrivenPropertyValueSpecification<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]
    
    radius?: { mixed?: number; single?: number }

    Badge radius in pixels, per cluster kind.

    single is the small badge tucked into 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 }
    
    strokeColor?: DataDrivenPropertyValueSpecification<string>

    Badge outline color.

    '#FFFFFF'
    
    strokeWidth?: DataDrivenPropertyValueSpecification<number>

    Badge outline width in pixels.

    1.5