TomTom Maps for JavaScript
    Preparing search index...

    Type Alias GeometryLineConfig

    Line/border configuration for geometries, with the outline colour, opacity and width.

    The curated fields cover the common cases, and layers.line takes any other line property (line-gap-width, line-cap, a line-dasharray of your own, …).

    // Curated fields
    const line: GeometryLineConfig = { color: '#333333', width: 2, opacity: 0.8, pattern: 'dashed' };

    // Data-driven border
    const line: GeometryLineConfig = {
    color: ['get', 'borderColor'],
    width: ['case', ['get', 'selected'], 4, 2],
    };
    type GeometryLineConfig = {
        color?: DataDrivenPropertyValueSpecification<string>;
        opacity?: DataDrivenPropertyValueSpecification<number>;
        pattern?: LinePattern;
        width?: DataDrivenPropertyValueSpecification<number>;
    }
    Index
    color?: DataDrivenPropertyValueSpecification<string>

    The border colour, as a hex string or a MapLibre expression such as ['get', 'borderColor'].

    Overrides a feature's color property, fill.color, fill.palette and the top-level GeometriesModuleConfig.color for the border.

    opacity?: DataDrivenPropertyValueSpecification<number>

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

    1
    
    pattern?: LinePattern

    Whether the border is drawn unbroken, in dashes or in dots. The dashes and dots scale with width.

    'solid'
    
    width?: DataDrivenPropertyValueSpecification<number>

    Border width in pixels. Also accepts a MapLibre expression, such as ['case', ['get', 'selected'], 4, 2].

    2