Mappedin JS - v6.14.0
    Preparing search index...

    Interface InitializeText3DState

    interface InitializeText3DState {
        color?: string;
        content?: string;
        fillOpacity?: number;
        flipToFaceCamera?: boolean;
        font?: string;
        fontSize?: number;
        hoverColor?: string;
        margin?: number | [number, number, number, number];
        maxHeight?: number;
        maxWidth?: number;
        outlineBlur?: string | number;
        outlineColor?: string;
        outlineOffsetX?: number;
        outlineOffsetY?: number;
        outlineOpacity?: number;
        outlineWidth?: number;
        position?: Position;
        rotation?: number;
        strokeColor?: string;
        strokeOpacity?: number;
        strokeWidth?: number;
        visible?: boolean;
    }
    Index

    Properties

    color?: string

    The color of the text.

    For geometry labels: Will change to hoverColor when the associated geometry is hovered.

    Accepts any CSS color string.

    'black'
    
    content?: string

    Content of the text3d

    fillOpacity?: number

    Opacity of the text fill, independent of stroke and outline opacity. Set to 0 to show only stroke/outline. Accepts values between 0 and 1.

    flipToFaceCamera?: boolean

    Attempt to keep the Text3D facing the camera as much as possible

    font?: string

    URL to a custom font file (.ttf, .otf, .woff). Falls back to Roboto if undefined.

    fontSize?: number

    The size of the text in meters.

    This represents the height of a line of text (similar to CSS font-size). The width of individual characters and the overall text block will scale proportionally based on the font's aspect ratio and the text content.

    For geometry labels: Will be automatically adjusted if the text exceeds the text area bounds.

    hoverColor?: string

    Color to display when the associated geometry is hovered.

    Only applies to geometry labels. When a geometry with a label is hovered, the text color changes from color to hoverColor.

    For point-based text: This property is ignored (text does not respond to hover events).

    Falls back to global hover color if undefined.

    margin?: number | [number, number, number, number]

    Padding between the text and its bounding box, in meters. Can be specified as either:

    • A single number for uniform padding on all sides
    • An array of 4 numbers [top, right, bottom, left] for individual side padding

    Only applies to geometry labels. Ignored for point-based text.

    [0.2, 1, 0.2, 1.5]
    
    maxHeight?: number

    Maximum height constraint for the text area in meters.

    Only applies to geometry labels. Overrides default text field constraints when set. Ignored for point-based text.

    maxWidth?: number

    Maximum width constraint for the text area in meters.

    Only applies to geometry labels. Overrides default text field constraints when set. Ignored for point-based text.

    outlineBlur?: string | number

    Blur radius for the text outline. Can be a number in pixels or a string with units.

    outlineColor?: string

    Color of the text outline. Accepts any CSS color string.

    'black'
    
    outlineOffsetX?: number

    Horizontal offset of the outline effect from the text, in pixels.

    outlineOffsetY?: number

    Vertical offset of the outline effect from the text, in pixels.

    outlineOpacity?: number

    Opacity of the text outline. Accepts values between 0 and 1.

    1
    
    outlineWidth?: number

    Width of the text outline effect in pixels.

    position?: Position

    The position of the Text3D in [lon, lat, altitude]

    rotation?: number

    Rotation of the text in degrees clockwise from North.

    strokeColor?: string

    Color of the text stroke when strokeWidth > 0. Accepts any CSS color string.

    'black'
    
    strokeOpacity?: number

    Opacity of the text stroke when strokeWidth > 0.

    1
    
    strokeWidth?: number

    Width of the inner stroke of each text glyph.

    0
    
    visible?: boolean

    Whether the Text3D is visible