Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TextStyle

A data type that provides style options for text on a map.

Hierarchy

  • TextStyle

Index

Properties

Optional anchor

anchor: "start" | "middle" | "end"

Determines how the text container is aligned relative to its position.

Optional autosize

autosize: boolean

Whether to automatically size the marker based on the width and height of the text. Default is true.

Optional color

color: string

Text color.

Optional padding

padding: number[]

Amount of padding to insert around the text as [x, y], where x is the amount of padding on the left and right, and y is the amount of padding on the top and bottom.

Optional position

position: AnchorType | Point

Position of the element within its parent container. Supports an anchor string for relative positioning, or an { x, y } point for absolute positioning.

Optional size

size: number

Font size.

Optional style

style: string

Font style, e.g. normal or bold.

Optional transform

transform: string

Defines a list of transform definitions that are applied to the element.

Optional translate

translate: { x?: number; y?: number }

Position translation amount in x and y coordinates.

Type declaration

  • Optional x?: number
  • Optional y?: number

value

value: string

Text value to display.

Generated using TypeDoc