3.2 Paint Properties
Paint properties control how features render. In Layer Symbology, each paint field can be Constant, Category, Graduated, Interpolated, or Property (identity). The UI stores the resulting MapLibre expressions in the sub-layer’s paint object.
Full spec: Layers - MapLibre Style Spec.
Paint keys by sub-layer type
type | Paint properties |
|---|---|
fill, gg_inverse-fill, gg_ngon-fill | fill-color, fill-opacity, fill-outline-color |
fill-extrusion, gg_ngon-fill-extrusion, gg_fill-extrusion-floors | fill-extrusion-color, fill-extrusion-height, fill-extrusion-base, fill-extrusion-opacity |
line, gg_point-vector | line-color, line-width, line-opacity, line-dasharray |
circle, gg_line-interpolate | circle-color, circle-radius, circle-opacity, circle-stroke-width, circle-stroke-color |
symbol, gg_3dsymbol | icon-color, icon-opacity, text-color, text-halo-color, text-halo-width (+ GG: symbol-height, halo props) |
heatmap | heatmap-color, heatmap-radius, heatmap-weight, heatmap-intensity |
as-filter | FilteredLayer, Type |
Array-valued paint (enter as comma-separated in the UI): line-dasharray, text-offset, icon-offset, text-translate, icon-translate, line-translate, fill-translate, circle-translate, fill-extrusion-translate.
Example dash pattern: "line-dasharray": [2, 4] — 2 px dash, 4 px gap.
Coloring modes → stored JSON
Constant
Single literal value for all features:
"fill-color": "#FF2F00",
"fill-opacity": 0.8,
"line-width": 5
Category (match)
One color (or size) per distinct attribute value:
"fill-color": [
"match",
["get", "ZONE"],
"RESI", "#FFD900",
"COMM", "#FF2F00",
"OPEN", "#97B067",
"#888888"
]
Graduated (step)
Discrete bins on an attribute or zoom:
"circle-radius": [
"step",
["get", "population"],
4,
1000, 6,
5000, 10,
20000, 16
]
Default (first value after input) applies below the first stop.
Interpolated (interpolate)
Smooth ramp between stops:
"fill-color": [
"interpolate",
["linear"],
["get", "density"],
0, "#E3DE61",
50, "#FFD900",
100, "#FF2F00"
]
Exponential curves use ["exponential", base] instead of ["linear"].
Property (identity)
Read color or number directly from a field:
"fill-color": {
"type": "identity",
"property": "hex_color"
}
Default symbology by geometry
When adding a sub-layer, Pantograf seeds constants roughly as:
| Geometry | type | Example paint |
|---|---|---|
| point | circle | red fill, radius 4, dark stroke |
| line | line | red, width 5, opacity 0.8 |
| polygon | fill | red fill, opacity 0.8 |
| vector / geotile MVT | fill | same as polygon (+ source-layer) |
Keywords
paint, properties, constant, category, graduated, interpolated, property, match, step, interpolate, fill, line, circle, symbol, dasharray, maplibre, color, opacity