Mvt Style Dsl
Type-safe builder DSL for MvtRuleBasedStyle. Lets a style read as a flat list of declarations:
val style = mvtStyle {
rule("water_polygons") {
zOrder = MvtStyle.Z_WATER
paint { fill(Color(0.70f, 0.85f, 0.96f)) }
}
rule("streets") {
filter = "kind" eq "motorway"
minZoom = 6
zOrder = MvtStyle.Z_ROAD_MOTORWAY
paint {
line(Color(0.91f, 0.39f, 0.32f))
lineWidth = MvtZoomInterp.floats(6 to 0.5f, 10 to 1.5f, 14 to 3.5f)
}
}
}Content copied to clipboard
Rules are emitted in declaration order — the same order they paint in (earlier under later). The first rule whose MvtStyleRule.matches returns true is the one that styles each feature; subsequent rules are ignored for that feature.