maplibre-gl-svg-sprite - v0.2.0
    Preparing search index...

    Interface OverlayTextParams

    Parameters for text overlay operation Maps to OverlayText op

    interface OverlayTextParams {
        text?: string;
        label?: string;
        fontSize?: number;
        fontWeight?: string | number;
        fontStyle?: string;
        fontFamily?: string;
        textColor?: string;
        fill?: string;
        textStroke?: string;
        textStrokeWidth?: number;
        textPadding?: number;
        textAnchor?:
            | "center"
            | "right"
            | "left"
            | "bottom"
            | "top"
            | "top-left"
            | "top-right"
            | "bottom-left"
            | "bottom-right";
        anchor?: string;
        tx?: number;
        ty?: number;
        fontLoadTimeout?: number;
        textAutoColor?: boolean;
        textUppercase?: boolean;
    }
    Index

    Properties

    text?: string

    Text content to display

    label?: string

    Alias for text

    fontSize?: number

    Font size in pixels (default: 14)

    fontWeight?: string | number

    Font weight (default: 'bold')

    fontStyle?: string

    Font style (default: 'normal')

    fontFamily?: string

    Font family (default: system-ui)

    textColor?: string

    Text fill color

    fill?: string

    Alias for textColor

    textStroke?: string

    Text stroke color (default: '#000')

    textStrokeWidth?: number

    Text stroke width (default: 3)

    textPadding?: number

    Text padding in pixels (default: 0)

    textAnchor?:
        | "center"
        | "right"
        | "left"
        | "bottom"
        | "top"
        | "top-left"
        | "top-right"
        | "bottom-left"
        | "bottom-right"

    Text anchor position: 'center', 'top', 'bottom', 'left', 'right', or combinations

    anchor?: string

    Alias for textAnchor

    tx?: number

    Text X offset

    ty?: number

    Text Y offset

    fontLoadTimeout?: number

    Font load timeout in ms (default: 1500)

    textAutoColor?: boolean

    Auto-pick contrasting text color from bg/overlay colors when textColor not provided

    textUppercase?: boolean

    Uppercase the text content