Interface TextSymbolizer

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

Hierarchy

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.

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 in pixels.

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.

Generated using TypeDoc