Mvt Rule Based Style
Style backed by an ordered list of MvtStyleRules. For each feature, iterates rules in order and returns the first match's resolved attributes. The same first match's MvtStyleRule.zOrder is reported from zOrderFor.
Rule order = paint order = z-order tiebreak. Put earlier rules where you want them under later rules. Within a tile, this layer relies on the rule list itself for cross-feature ordering; the per-rule MvtStyleRule.zOrder is used by MvtVectorLayer to coordinate cross-tile compositing (water-tile under road-tile etc.).
Use the mvtStyle DSL to author one of these declaratively, or pass a pre-built list of rules to the constructor.
Types
Mutable holder for firstShapeAndText results; reused across features to avoid allocation.
Properties
Solid base under every fill — the Mapbox background layer. Fills gaps MVT has no polygon for (bare rock, street interiors, highway corridors); null (default) shows whatever is beneath the layer. See Z_BACKGROUND.
Functions
Single-pass shape+text resolution for one feature. Walks rules ONCE by index (no iterator allocation), evaluating each rule's MvtStyleRule.matches at most once, and captures into out the FIRST matching rule whose paint hasShape and (independently) the FIRST whose paint hasText. Early-exits once both are found. Byte-identical to two separate firstMatching(...) { it.paint.hasShape } / { it.paint.hasText } calls, but without re-walking the list or re-running matches twice per rule.
Zoom-blind callers resolve at zoom 0; use the zoom-aware overload for proper interpolation.
Zoom-aware overload — MvtVectorLayer passes the tile's z.
Optional paint order within a tile. Features with smaller zOrderFor paint first, features with larger values paint over them. Default 0 — every feature shares the same z-layer, and the order falls through to MVT-server-determined layer iteration order (good enough for OpenMapTiles-schema servers that already order water → landuse → roads → buildings sensibly).