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

    Type Alias GeometryFillConfig

    Fill configuration for geometry styling — the interior color and opacity.

    // Solid color with opacity
    const fill: GeometryFillConfig = { color: '#FF5733', opacity: 0.3 };

    // Palette name
    const fill: GeometryFillConfig = { color: 'blues', opacity: 0.25 };

    // Data-driven color based on properties
    const fill: GeometryFillConfig = {
    color: ['match', ['get', 'type'], 'residential', '#FFEB3B', 'commercial', '#2196F3', '#E0E0E0'],
    opacity: 0.4,
    };
    type GeometryFillConfig = {
        color?: ColorPaletteOptions | string | ExpressionSpecification;
        opacity?: DataDrivenPropertyValueSpecification<number>;
    }
    Index
    color?: ColorPaletteOptions | string | ExpressionSpecification

    Fill color: a hex string ('#FF5733'), a palette name ('blues', see colorPaletteIDs), or a MapLibre expression for data-driven styling (e.g. ['get', 'color']).

    Overrides the top-level GeometriesModuleConfig.color for the fill, and for the border unless line.color is set. A feature's own color property overrides it.

    opacity?: DataDrivenPropertyValueSpecification<number>

    Fill opacity, 0 (transparent) to 1 (opaque). Also accepts a MapLibre expression.

    0.15