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

typePaint properties
fill, gg_inverse-fill, gg_ngon-fillfill-color, fill-opacity, fill-outline-color
fill-extrusion, gg_ngon-fill-extrusion, gg_fill-extrusion-floorsfill-extrusion-color, fill-extrusion-height, fill-extrusion-base, fill-extrusion-opacity
line, gg_point-vectorline-color, line-width, line-opacity, line-dasharray
circle, gg_line-interpolatecircle-color, circle-radius, circle-opacity, circle-stroke-width, circle-stroke-color
symbol, gg_3dsymbolicon-color, icon-opacity, text-color, text-halo-color, text-halo-width (+ GG: symbol-height, halo props)
heatmapheatmap-color, heatmap-radius, heatmap-weight, heatmap-intensity
as-filterFilteredLayer, 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:

GeometrytypeExample paint
pointcirclered fill, radius 4, dark stroke
linelinered, width 5, opacity 0.8
polygonfillred fill, opacity 0.8
vector / geotile MVTfillsame as polygon (+ source-layer)

Keywords

paint, properties, constant, category, graduated, interpolated, property, match, step, interpolate, fill, line, circle, symbol, dasharray, maplibre, color, opacity