Validates the label block of a style, in either of its two accepted forms.
label may be a string — the name of the style, as a legend titles it, which needs no
further checking — or a configuration object for the text drawn on the features, whose
font size, colour, opacity, buffer and offset are then validated. A key of that object the
renderer does not read is ignored here; refusing it is the job of the profile schema. An
absent label is not a defect. Anything else (a number, an array) is an error.
Accumulator contract: findings are pushed into errors and warnings, nothing is returned.
Parameters
styleData: Record<string,unknown>
The style object to inspect; a missing label returns immediately.
Validates the
labelblock of a style, in either of its two accepted forms.labelmay be a string — the name of the style, as a legend titles it, which needs no further checking — or a configuration object for the text drawn on the features, whose font size, colour, opacity, buffer and offset are then validated. A key of that object the renderer does not read is ignored here; refusing it is the job of the profile schema. An absentlabelis not a defect. Anything else (a number, an array) is an error.Accumulator contract: findings are pushed into
errorsandwarnings, nothing is returned.