LabelOptions
Label initialization options.
number[]
The offset distance of text box from its relativeAnchor
.
Positive values indicate left and up, while negative values indicate right and down.
[DEPRECATED] Will be removed in the next major release, use the offset
option instead.
string
Expression
Text color in hexadecimal RGB (#ff0000
) or RGBA (#ff0000ff
) format.
number[]
An array of numbers [longitude, latitude, height?]
, where:
longitude
andlatitude
are the geographical coordinates of the top-left corner of the label. Taking into account therelativeAnchor
option.height
is an optional number in meters by which the label will be raised/lowered (depending on the sign of the value) relative to the map surface. 0 by default.
undefined
number
Text size.
string
Expression
Background color of letters (when haloRadius
is specified). The same format as for color
.
undefined
number
Use haloRadius
to add background behind each letter.
Background image for the label.
undefined
false
true
Allows the label to emit events (like mouseover
). false
by default.
Labeling options
none
- the label is not involved in the labeling process in any waypointLabelsOnly
- the label overlaps or can be overlapped by labels having this labeling option specified as type
undefined
number
Space between each letter.
undefined
number
For multiline label lineHeight
specify how far lines between each other.
undefined
number
Maximum display styleZoom of the label.
undefined
number
Minimum display styleZoom of the label.
number[]
The offset distance of text box from its relativeAnchor
.
Positive values indicate right and down, while negative values indicate left and up.
number[]
Coordinates (from 0 to 1 in each dimension) of the text box "tip" relative to its top left corner, for example:
[0, 0] value is the top left corner, [0.5, 0.5] — center point, and [1, 1] is the bottom right corner of the box.
The label will be placed so that this point is at geographical coordinates
respects the absolute offset
.
string
Label's text.
any
User specific data.
undefined
number
Draw order.