The inline labelConfig accepted by enableLabels(). When the call prepares labels, it is
stored with the layer's label state and read at every render, until another enableLabels()
call or a re-initialisation of the layer's labels (the loader, a style change) replaces that
state. The core makes such a call itself when a layer whose declaration says
visibleByDefault: true is shown again: its labels are prepared anew with an empty
configuration, and what an earlier call passed here is no longer read.
What is read from it depends on the layer:
a layer that DECLARES no label configuration — neither its style's label object nor its
definition's labels block: this object is the whole configuration. enabled: true and
labelId (the feature property displayed) are required; font.sizePt, color, opacity,
buffer and offset shape the text;
a layer that declares one: the declaration decides whether labels exist and how they look.
Only two things are still read here — labelId, when the declaration names no field, and
minZoom/maxZoom, when the layer's current style sets no labelScale.
minZoom and maxZoom apply only together. styleFile is refused.
The inline
labelConfigaccepted byenableLabels(). When the call prepares labels, it is stored with the layer's label state and read at every render, until anotherenableLabels()call or a re-initialisation of the layer's labels (the loader, a style change) replaces that state. The core makes such a call itself when a layer whose declaration saysvisibleByDefault: trueis shown again: its labels are prepared anew with an empty configuration, and what an earlier call passed here is no longer read.What is read from it depends on the layer:
labelobject nor its definition'slabelsblock: this object is the whole configuration.enabled: trueandlabelId(the feature property displayed) are required;font.sizePt,color,opacity,bufferandoffsetshape the text;labelId, when the declaration names nofield, andminZoom/maxZoom, when the layer's current style sets nolabelScale.minZoomandmaxZoomapply only together.styleFileis refused.