GeoLeaf Core API - v3.0.0
    Preparing search index...
    • Validates the label block of a style, in either of its two accepted forms.

      label may be a string — the feature property to display, which needs no further checking — or a configuration object, whose colour, opacity, buffer, background and offset are then validated. 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.

      • errors: ValidationErrorItem[]

        Accumulator for blocking failures. Mutated in place.

      • warnings: ValidationWarningItem[]

        Accumulator for non-blocking remarks. Mutated in place.

      • context: Record<string, unknown>

        Diagnostic data merged into every finding.

      Returns void