GeoLeaf Core API - v3.0.0
    Preparing search index...
    • Validates the scale constraints of a style — scaleConfig (the layer) and labelScale (its labels).

      ⚠️ Both are expressed in scale denominators (the X of 1:X), never in MapLibre zoom levels. This is the point the retired zoomConfig got wrong: its name said zoom while the engine read denominators, so { minZoom: 6 } hid layers at every zoom. zoomConfig is therefore rejected outright rather than ignored, and unknown keys inside a scale object are errors too — silently dropping them would leave the layer unconstrained, the same failure one level quieter.

      Both fields are optional; absent means no constraint. Accumulator contract — see validateStyleRules.

      Parameters

      • styleData: Record<string, unknown>

        The style object to inspect.

      • errors: ValidationErrorItem[]

        Accumulator for blocking failures. Mutated in place.

      • _warnings: ValidationWarningItem[]

        Accepted for signature symmetry with the other validators; unused.

      • context: Record<string, unknown>

        Diagnostic data merged into every finding.

      Returns void