Skip to content

LineLayerSchema

const LineLayerSchema: ZodObject<object & object, "passthrough", ZodTypeAny, objectOutputType<object & object, ZodTypeAny, "passthrough">, objectInputType<object & object, ZodTypeAny, "passthrough">>

Defined in: packages/core/src/schemas/layer.schema.ts:645

Line layer for linear features.

Renders lines from LineString or Polygon geometries. Supports dash patterns, gradients, and data-driven styling.

Basic Line

- id: roads
type: line
source:
type: geojson
url: "https://example.com/roads.geojson"
paint:
line-color: "#333333"
line-width: 2

Dashed Line

paint:
line-color: "#0000ff"
line-width: 3
line-dasharray: [2, 1]

MapLibre Line Layer