TomTom Maps for JavaScript
    Preparing search index...

    Type Alias LabelConfig

    How a module's text labels look. Sizes and widths are in pixels, and every field but the two typefaces also takes a MapLibre expression.

    type LabelConfig = {
        color?: DataDrivenPropertyValueSpecification<string>;
        customTypeface?: CustomTypeface;
        font?: DataDrivenPropertyValueSpecification<MapFont[]>;
        haloColor?: DataDrivenPropertyValueSpecification<string>;
        haloWidth?: DataDrivenPropertyValueSpecification<number>;
        opacity?: DataDrivenPropertyValueSpecification<number>;
        size?: DataDrivenPropertyValueSpecification<number>;
        typeface?: MapTypeface;
    }
    Index
    color?: DataDrivenPropertyValueSpecification<string>

    Text colour.

    customTypeface?: CustomTypeface

    A typeface of your own font files for these labels alone. It wins over typeface, and a font wins over it.

    font?: DataDrivenPropertyValueSpecification<MapFont[]>

    Font faces. The first available one wins. Leave it out to keep the module's own face, set in the labels' typeface.

    haloColor?: DataDrivenPropertyValueSpecification<string>

    Colour of the halo drawn around the text, for legibility.

    haloWidth?: DataDrivenPropertyValueSpecification<number>

    Width of the halo, in pixels.

    opacity?: DataDrivenPropertyValueSpecification<number>

    Text opacity, 0 (transparent) to 1 (opaque).

    size?: DataDrivenPropertyValueSpecification<number>

    Font size, in pixels.

    typeface?: MapTypeface

    Typeface of these labels alone, each keeping its weight. Leave it out and they follow the map's typeface, which StylingFoundationsModule sets. A customTypeface or a font wins over it.