Skip to content

Layer Types

Layers define how your data is visualized on the map. maplibre-yaml supports all MapLibre layer types.

All layers share these base properties:

Property Type Default Description
id * string Unique identifier for the layer
type * string Layer type (circle, line, fill, etc.)
source * Source | string Data source configuration or reference
source-layer string Source layer (for vector tiles)
minzoom number 0 Minimum zoom level
maxzoom number 24 Maximum zoom level
filter Expression Filter expression
visible boolean true Initial visibility
before string Insert before this layer ID
interactive object Click/hover configuration
legend object Legend entry configuration

Renders points as circles. Great for point data visualization.

Circle layer with data-driven radius
Property Type Default Description
circle-radius number | Expression 5 Circle radius in pixels
circle-color color | Expression "#000000" Fill color
circle-opacity number | Expression 1 Fill opacity (0-1)
circle-stroke-width number | Expression 0 Stroke width in pixels
circle-stroke-color color | Expression "#000000" Stroke color
circle-stroke-opacity number | Expression 1 Stroke opacity (0-1)
circle-blur number | Expression 0 Blur amount
- id: points
type: circle
source:
type: geojson
url: "https://example.com/points.geojson"
paint:
circle-radius: 8
circle-color: "#ff0000"

Renders lines and line strings. Perfect for routes, boundaries, and networks.