geostyler-style
    Preparing search index...

    Interface TextSymbolizer

    The TextSymbolizer describes the style representation of point data, if styled with a text.

    interface TextSymbolizer {
        allowOverlap?: boolean | GeoStylerBooleanFunction;
        anchor?:
            | "center"
            | "left"
            | "top"
            | "bottom"
            | "right"
            | GeoStylerStringFunction
            | "top-left"
            | "top-right"
            | "bottom-left"
            | "bottom-right";
        avoidEdges?: boolean
        | GeoStylerBooleanFunction;
        color?: string | GeoStylerStringFunction;
        font?: (string | GeoStylerStringFunction)[];
        fontStyle?: "normal" | GeoStylerStringFunction | "italic" | "oblique";
        fontWeight?: "bold" | "normal" | GeoStylerStringFunction;
        haloBlur?: number | GeoStylerNumberFunction;
        haloColor?: string | GeoStylerStringFunction;
        haloOpacity?: number | GeoStylerNumberFunction;
        haloWidth?: number | GeoStylerNumberFunction;
        haloWidthUnit?: DistanceUnit;
        justify?: "center" | "left" | "right" | GeoStylerStringFunction;
        keepUpright?: boolean | GeoStylerBooleanFunction;
        kind: "Text";
        label?: string | GeoStylerStringFunction;
        letterSpacing?: number | GeoStylerNumberFunction;
        letterSpacingUnit?: "em" | DistanceUnit;
        lineHeight?: number | GeoStylerNumberFunction;
        lineHeightUnit?: "em" | DistanceUnit;
        maxAngle?: number | GeoStylerNumberFunction;
        maxWidth?: number | GeoStylerNumberFunction;
        offset?: [
            number
            | GeoStylerNumberFunction,
            number | GeoStylerNumberFunction,
        ];
        offsetAnchor?: "map" | GeoStylerStringFunction | "viewport";
        opacity?: number | GeoStylerNumberFunction;
        optional?: boolean | GeoStylerBooleanFunction;
        padding?: number | GeoStylerNumberFunction;
        perpendicularOffset?: number | GeoStylerNumberFunction;
        pitchAlignment?: "map" | "auto" | GeoStylerStringFunction | "viewport";
        placement?: "line" | GeoStylerStringFunction | "point" | "line-center";
        rotate?: number | GeoStylerNumberFunction;
        rotationAlignment?: "map" | "auto" | GeoStylerStringFunction | "viewport";
        size?: number | GeoStylerNumberFunction;
        sizeUnit?: DistanceUnit;
        transform?: "none" | GeoStylerStringFunction | "uppercase" | "lowercase";
        visibility?: boolean | GeoStylerBooleanFunction;
    }

    Hierarchy (View Summary)

    Index

    Properties

    allowOverlap?: boolean | GeoStylerBooleanFunction

    If true, the text will be visible even if it collides with other previously drawn symbols.

    anchor?:
        | "center"
        | "left"
        | "top"
        | "bottom"
        | "right"
        | GeoStylerStringFunction
        | "top-left"
        | "top-right"
        | "bottom-left"
        | "bottom-right"

    The anchor position of the label referred to the center of the geometry.

    avoidEdges?: boolean | GeoStylerBooleanFunction

    This is a property relevant if using tiled datasets. If true, the symbols will not cross tile edges to avoid mutual collisions.

    color?: string | GeoStylerStringFunction

    A color defined as a hex-color string.

    font?: (string | GeoStylerStringFunction)[]
    fontStyle?: "normal" | GeoStylerStringFunction | "italic" | "oblique"

    Specifies whether a font should be styled with a normal, italic, or oblique face from its font-family.

    fontWeight?: "bold" | "normal" | GeoStylerStringFunction

    Specifies the weight (or boldness) of the font. The weights available depend on the font-family you are using.

    haloBlur?: number | GeoStylerNumberFunction

    The halo's fadeout distance towards the outside.

    haloColor?: string | GeoStylerStringFunction

    The color of the text's halo, which helps it stand out from backgrounds represented as a hex-color string.

    haloOpacity?: number | GeoStylerNumberFunction

    The opacity of the halo. A value between 0 and 1. 0 means no opacity (i.e. transparent) and 1 is fully opaque.

    haloWidth?: number | GeoStylerNumberFunction

    Distance of halo to the font outline (pixels if haloWidthUnit is not defined).

    haloWidthUnit?: DistanceUnit

    Unit to use for the haloWidth.

    justify?: "center" | "left" | "right" | GeoStylerStringFunction

    Text justification option to align the text.

    keepUpright?: boolean | GeoStylerBooleanFunction

    If true, the text will be kept upright.

    kind: "Text"

    Describes the type of the kind of the Symbolizer.

    label?: string | GeoStylerStringFunction

    Template string where {{PROPERTYNAME}} can be used to be replaced by values from the dataset. e.g.: "Name {{country_name}}"

    letterSpacing?: number | GeoStylerNumberFunction

    Sets the spacing between text characters (pixels if letterSpacingUnit is not defined).

    letterSpacingUnit?: "em" | DistanceUnit

    Unit to use for the letterSpacing.

    lineHeight?: number | GeoStylerNumberFunction

    Sets the line height (pixels if lineHeightUnit is not defined). 'em' -> fontsize

    lineHeightUnit?: "em" | DistanceUnit

    Unit to use for the lineHeight. 'em' -> fontsize

    maxAngle?: number | GeoStylerNumberFunction

    Maximum angle change between adjacent characters in degrees.

    maxWidth?: number | GeoStylerNumberFunction

    The maximum line width for text wrapping.

    offset?: [number | GeoStylerNumberFunction, number | GeoStylerNumberFunction]

    The offset of the Symbolizer as [x, y] coordinates. Positive values indicate right and down, while negative values indicate left and up.

    offsetAnchor?: "map" | GeoStylerStringFunction | "viewport"
    opacity?: number | GeoStylerNumberFunction

    Determines the total opacity for the Symbolizer. A value between 0 and 1. 0 is none opaque and 1 is full opaque.

    optional?: boolean | GeoStylerBooleanFunction

    Property relevant for mapbox-styles. If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.

    padding?: number | GeoStylerNumberFunction

    Size of the additional area around the text bounding box used for detecting symbol collisions.

    perpendicularOffset?: number | GeoStylerNumberFunction

    If placement is 'line', it makes the renderer offset the text parallel to the line, at the given distance. Positive values generate an offset parallel to the line on the left hand side, negative values on the right hand side.

    pitchAlignment?: "map" | "auto" | GeoStylerStringFunction | "viewport"
    placement?: "line" | GeoStylerStringFunction | "point" | "line-center"

    Specifies label placement relative to its geometry.

    rotate?: number | GeoStylerNumberFunction

    The rotation of the Symbolizer in degrees. Value should be between 0 and 360.

    rotationAlignment?: "map" | "auto" | GeoStylerStringFunction | "viewport"
    size?: number | GeoStylerNumberFunction

    The fontsize (pixels if sizeUnit is not defined).

    sizeUnit?: DistanceUnit

    Unit to use for the size. If missing, pixels are assumed.

    transform?: "none" | GeoStylerStringFunction | "uppercase" | "lowercase"

    Specifies how to capitalize text, similar to the CSS text-transform property.

    visibility?: boolean | GeoStylerBooleanFunction

    Defines whether the Symbolizer should be visibile or not.