Map block (v2, opt-in)
A format-v2 map block (version: 2): the same capabilities as v1, split into a style: half (everything that erases to a MapLibre style.json) and a runtime: half (everything that degrades). Source and layer spec bodies are the v1 ones; their live-data and experience keys move under a nested runtime:. For the why, see Format v2.
version
Section titled “version”Type: 2 · Required
Format version — v2 documents state version: 2
Type: "map" · Required
Block type
Type: string · Required
Unique block identifier
Type: string
The map’s name, read out by screen readers as its accessible name (default: “Map”, or locale Map.Title)
description
Section titled “description”Type: string
What the map shows, in a sentence or two — its text alternative, read by screen readers as the map’s description
Type: object · Required
The style half — everything that erases to style.json
basemap
Section titled “basemap”Path: style.basemap · Type: string (URL) | object | any
Base style URL or inline style object (v2 rename of v1 mapStyle)
Same shape as config.mapStyle.
center
Section titled “center”Path: style.center · Type: [number, number]
Map center [longitude, latitude]
Path: style.zoom · Type: number · Range: 0 to 24
Zoom level (0-24)
Path: style.pitch · Type: number · Default: 0 · Range: 0 to 85
Camera pitch angle (0-85)
bearing
Section titled “bearing”Path: style.bearing · Type: number · Default: 0 · Range: -180 to 180
Camera bearing (-180-180)
metadata
Section titled “metadata”Path: style.metadata · Type: map of any
Style metadata (style-spec root metadata slot)
Path: style.state · Type: map of object
Spec-native runtime-tunable values, read via global-state
Same shape as state.
images
Section titled “images”Path: style.images · Type: map of string | object
Named images for symbol layers and patterns — style half, merged into the sprite on export
Same shape as images.
terrain
Section titled “terrain”Path: style.terrain · Type: object
3D terrain from a raster-dem source — style half, compiles to style.json terrain
Same shape as terrain.
Path: style.sky · Type: object
Sky, fog, and globe atmosphere — style half, compiles to style.json sky
Same shape as sky.
projection
Section titled “projection”Path: style.projection · Type: object
Map projection (globe needs maplibre-gl >= 5) — style half, compiles to style.json projection
Same shape as projection.
Path: style.light · Type: object
The style-spec light shading fill-extrusion faces — style half, compiles to style.json light
Same shape as light.
sources
Section titled “sources”Path: style.sources · Type: map of object
Map sources, each with an optional nested runtime:
<source-id>
Section titled “<source-id>”Path: style.sources.<source-id> · Type: object
One of 7 variants, selected by type: geojson, vector, raster, raster-dem, image, video, grid.
type: geojson
Section titled “type: geojson”Path: style.sources.<source-id>.type · Type: "geojson" · Required
Source type
Path: style.sources.<source-id>.url · Type: string · Pattern: ^(?:[a-zA-Z][a-zA-Z\d+\-.]*:|\/|\.\.?\/|[^\s:/?#][^:/?#]*(?:[/?#]|$))
URL of a GeoJSON file, or of a FlatGeobuf (.fgb) or GeoParquet (.parquet) file
Path: style.sources.<source-id>.data · Type: GeoJSON
Inline GeoJSON object
cluster
Section titled “cluster”Path: style.sources.<source-id>.cluster · Type: boolean
Enable point clustering
clusterRadius
Section titled “clusterRadius”Path: style.sources.<source-id>.clusterRadius · Type: integer · Minimum: 0
Cluster radius in pixels (default: 50)
clusterMaxZoom
Section titled “clusterMaxZoom”Path: style.sources.<source-id>.clusterMaxZoom · Type: number · Range: 0 to 24
Maximum zoom level to cluster points
clusterMinPoints
Section titled “clusterMinPoints”Path: style.sources.<source-id>.clusterMinPoints · Type: integer · Minimum: 2
Minimum points to form a cluster
clusterProperties
Section titled “clusterProperties”Path: style.sources.<source-id>.clusterProperties · Type: map of any
Aggregate cluster properties
tolerance
Section titled “tolerance”Path: style.sources.<source-id>.tolerance · Type: number
Douglas-Peucker simplification tolerance (higher = simpler geometry)
buffer
Section titled “buffer”Path: style.sources.<source-id>.buffer · Type: number
Tile buffer size on each side, in pixels at tile scale
lineMetrics
Section titled “lineMetrics”Path: style.sources.<source-id>.lineMetrics · Type: boolean
Calculate line distance metrics (required for line-gradient)
generateId
Section titled “generateId”Path: style.sources.<source-id>.generateId · Type: boolean
Assign feature ids from each feature’s index (enables feature-state)
promoteId
Section titled “promoteId”Path: style.sources.<source-id>.promoteId · Type: string | map of string
Feature property to use as the feature id (for feature-state), or a map of source-layer name to property name
attribution
Section titled “attribution”Path: style.sources.<source-id>.attribution · Type: string
Attribution text
runtime
Section titled “runtime”Path: style.sources.<source-id>.runtime · Type: object · Default: {}
Per-source live-data configuration
refresh
Section titled “refresh”Path: style.sources.<source-id>.runtime.refresh · Type: object
Polling refresh configuration
Same shape as sources.<source-id>.refresh (type: geojson).
stream
Section titled “stream”Path: style.sources.<source-id>.runtime.stream · Type: object
WebSocket/SSE streaming configuration
Same shape as sources.<source-id>.stream (type: geojson).
Path: style.sources.<source-id>.runtime.cache · Type: object
Cache configuration
Same shape as sources.<source-id>.cache.
loading
Section titled “loading”Path: style.sources.<source-id>.runtime.loading · Type: object
Deprecated, no effect: no per-source loading overlay is drawn. The map shows “Loading map…” while it starts
Same shape as sources.<source-id>.loading.
prefetchedData
Section titled “prefetchedData”Path: style.sources.<source-id>.runtime.prefetchedData · Type: GeoJSON
Pre-fetched inline GeoJSON from build time
fetchStrategy
Section titled “fetchStrategy”Path: style.sources.<source-id>.runtime.fetchStrategy · Type: "runtime" | "build" | "hybrid" · Default: "runtime"
No effect (deprecated): data is always fetched in the browser when the map loads. build and hybrid warn and do nothing
format
Section titled “format”Path: style.sources.<source-id>.runtime.format · Type: "pmtiles" | "flatgeobuf" | "geoparquet" | "cog"
File format, when the URL doesn’t show it (pmtiles, flatgeobuf, geoparquet, cog)
Path: style.sources.<source-id>.runtime.load · Type: "all" | "viewport" | object
FlatGeobuf/GeoParquet: read the whole file (all, default) or only the features in view (viewport)
Allowed values: all, viewport
Same shape as sources.<source-id>.load (type: geojson).
columns
Section titled “columns”Path: style.sources.<source-id>.runtime.columns · Type: "all" | string[]
GeoParquet: the columns to read (default: the ones this document references), or all
colorRamp
Section titled “colorRamp”Path: style.sources.<source-id>.runtime.colorRamp · Type: object
COG: colours for a single band of values (palette or colors, min, max)
Same shape as sources.<source-id>.colorRamp (type: raster).
type: vector
Section titled “type: vector”Path: style.sources.<source-id>.type · Type: "vector" · Required
Source type
Path: style.sources.<source-id>.url · Type: string · Pattern: ^(?:[a-zA-Z][a-zA-Z\d+\-.]*:|\/|\.\.?\/|[^\s:/?#][^:/?#]*(?:[/?#]|$))
TileJSON URL, or a PMTiles archive (.pmtiles or pmtiles://)
Path: style.sources.<source-id>.tiles · Type: string[]
Tile URL template array
minzoom
Section titled “minzoom”Path: style.sources.<source-id>.minzoom · Type: number · Range: 0 to 24
Minimum zoom level
maxzoom
Section titled “maxzoom”Path: style.sources.<source-id>.maxzoom · Type: number · Range: 0 to 24
Maximum zoom level
bounds
Section titled “bounds”Path: style.sources.<source-id>.bounds · Type: [number, number, number, number]
Bounding box [west, south, east, north]
scheme
Section titled “scheme”Path: style.sources.<source-id>.scheme · Type: "xyz" | "tms"
Tile coordinate scheme
attribution
Section titled “attribution”Path: style.sources.<source-id>.attribution · Type: string
Attribution text
promoteId
Section titled “promoteId”Path: style.sources.<source-id>.promoteId · Type: string | map of string
Feature property to use as the feature id (for feature-state), or a map of source-layer name to property name
volatile
Section titled “volatile”Path: style.sources.<source-id>.volatile · Type: boolean
Skip the tile cache (MapLibre volatile); for frequently changing tiles
encoding
Section titled “encoding”Path: style.sources.<source-id>.encoding · Type: "mvt" | "mlt"
The tiles’ format: mvt (Mapbox Vector Tiles, the default) or mlt (MapLibre Tiles, maplibre-gl 6+). A PMTiles archive whose header says MLT gets mlt without it; a value written here wins
runtime
Section titled “runtime”Path: style.sources.<source-id>.runtime · Type: object
Per-source live-data configuration
refresh
Section titled “refresh”Path: style.sources.<source-id>.runtime.refresh · Type: object
Polling refresh configuration
Same shape as sources.<source-id>.refresh (type: geojson).
stream
Section titled “stream”Path: style.sources.<source-id>.runtime.stream · Type: object
WebSocket/SSE streaming configuration
Same shape as sources.<source-id>.stream (type: geojson).
Path: style.sources.<source-id>.runtime.cache · Type: object
Cache configuration
Same shape as sources.<source-id>.cache.
loading
Section titled “loading”Path: style.sources.<source-id>.runtime.loading · Type: object
Deprecated, no effect: no per-source loading overlay is drawn. The map shows “Loading map…” while it starts
Same shape as sources.<source-id>.loading.
prefetchedData
Section titled “prefetchedData”Path: style.sources.<source-id>.runtime.prefetchedData · Type: any
Pre-fetched data from build time
fetchStrategy
Section titled “fetchStrategy”Path: style.sources.<source-id>.runtime.fetchStrategy · Type: "runtime" | "build" | "hybrid"
No effect (deprecated): data is always fetched in the browser when the map loads. build and hybrid warn and do nothing
format
Section titled “format”Path: style.sources.<source-id>.runtime.format · Type: "pmtiles" | "flatgeobuf" | "geoparquet" | "cog"
File format, when the URL doesn’t show it (pmtiles, flatgeobuf, geoparquet, cog)
Path: style.sources.<source-id>.runtime.load · Type: "all" | "viewport" | object
FlatGeobuf/GeoParquet: read the whole file (all, default) or only the features in view (viewport)
Allowed values: all, viewport
Same shape as sources.<source-id>.load (type: geojson).
columns
Section titled “columns”Path: style.sources.<source-id>.runtime.columns · Type: "all" | string[]
GeoParquet: the columns to read (default: the ones this document references), or all
colorRamp
Section titled “colorRamp”Path: style.sources.<source-id>.runtime.colorRamp · Type: object
COG: colours for a single band of values (palette or colors, min, max)
Same shape as sources.<source-id>.colorRamp (type: raster).
type: raster
Section titled “type: raster”Path: style.sources.<source-id>.type · Type: "raster" · Required
Source type
Path: style.sources.<source-id>.url · Type: string · Pattern: ^(?:[a-zA-Z][a-zA-Z\d+\-.]*:|\/|\.\.?\/|[^\s:/?#][^:/?#]*(?:[/?#]|$))
TileJSON URL, a PMTiles archive (.pmtiles or pmtiles://), or a COG (.tif or cog://)
Path: style.sources.<source-id>.tiles · Type: string[]
Tile URL template array
tileSize
Section titled “tileSize”Path: style.sources.<source-id>.tileSize · Type: integer · Default: 512 · Minimum: 1
Tile size in pixels
minzoom
Section titled “minzoom”Path: style.sources.<source-id>.minzoom · Type: number · Range: 0 to 24
Minimum zoom level
maxzoom
Section titled “maxzoom”Path: style.sources.<source-id>.maxzoom · Type: number · Range: 0 to 24
Maximum zoom level
bounds
Section titled “bounds”Path: style.sources.<source-id>.bounds · Type: [number, number, number, number]
Bounding box [west, south, east, north]
scheme
Section titled “scheme”Path: style.sources.<source-id>.scheme · Type: "xyz" | "tms"
Tile coordinate scheme
attribution
Section titled “attribution”Path: style.sources.<source-id>.attribution · Type: string
Attribution text
volatile
Section titled “volatile”Path: style.sources.<source-id>.volatile · Type: boolean
Skip the tile cache (MapLibre volatile); for frequently changing tiles
runtime
Section titled “runtime”Path: style.sources.<source-id>.runtime · Type: object
Per-source live-data configuration
Same shape as style.sources.<source-id>.runtime (type: vector).
type: raster-dem
Section titled “type: raster-dem”Path: style.sources.<source-id>.type · Type: "raster-dem" · Required
Source type
Path: style.sources.<source-id>.url · Type: string · Pattern: ^(?:[a-zA-Z][a-zA-Z\d+\-.]*:|\/|\.\.?\/|[^\s:/?#][^:/?#]*(?:[/?#]|$))
TileJSON URL, a PMTiles archive (.pmtiles or pmtiles://), or an elevation COG (.tif or cog://)
Path: style.sources.<source-id>.tiles · Type: string[]
Tile URL template array
tileSize
Section titled “tileSize”Path: style.sources.<source-id>.tileSize · Type: integer · Default: 512 · Minimum: 1
Tile size in pixels
encoding
Section titled “encoding”Path: style.sources.<source-id>.encoding · Type: "terrarium" | "mapbox" | "custom" · Default: "mapbox"
How elevation is encoded in the tile’s RGB channels
minzoom
Section titled “minzoom”Path: style.sources.<source-id>.minzoom · Type: number · Range: 0 to 24
Minimum zoom level
maxzoom
Section titled “maxzoom”Path: style.sources.<source-id>.maxzoom · Type: number · Range: 0 to 24
Maximum zoom level
bounds
Section titled “bounds”Path: style.sources.<source-id>.bounds · Type: [number, number, number, number]
Bounding box [west, south, east, north]
attribution
Section titled “attribution”Path: style.sources.<source-id>.attribution · Type: string
Attribution text
volatile
Section titled “volatile”Path: style.sources.<source-id>.volatile · Type: boolean
Skip the tile cache (MapLibre volatile); for frequently changing tiles
runtime
Section titled “runtime”Path: style.sources.<source-id>.runtime · Type: object
Per-source live-data configuration
Same shape as style.sources.<source-id>.runtime (type: vector).
type: image
Section titled “type: image”Path: style.sources.<source-id>.type · Type: "image" · Required
Source type
Path: style.sources.<source-id>.url · Type: string · Required · Pattern: ^(?:[a-zA-Z][a-zA-Z\d+\-.]*:|\/|\.\.?\/|[^\s:/?#][^:/?#]*(?:[/?#]|$))
Image URL
coordinates
Section titled “coordinates”Path: style.sources.<source-id>.coordinates · Type: [[number, number], [number, number], [number, number], [number, number]] · Required
Four corner coordinates [topLeft, topRight, bottomRight, bottomLeft]
runtime
Section titled “runtime”Path: style.sources.<source-id>.runtime · Type: object
Per-source live-data configuration
Same shape as style.sources.<source-id>.runtime (type: vector).
type: video
Section titled “type: video”Path: style.sources.<source-id>.type · Type: "video" · Required
Source type
Path: style.sources.<source-id>.urls · Type: string[] · Required · Min items: 1
Array of video URLs for browser compatibility
coordinates
Section titled “coordinates”Path: style.sources.<source-id>.coordinates · Type: [[number, number], [number, number], [number, number], [number, number]] · Required
Four corner coordinates [topLeft, topRight, bottomRight, bottomLeft]
runtime
Section titled “runtime”Path: style.sources.<source-id>.runtime · Type: object
Per-source live-data configuration
Same shape as style.sources.<source-id>.runtime (type: vector).
type: grid
Section titled “type: grid”Path: style.sources.<source-id>.type · Type: "grid" · Required
Source type
Path: style.sources.<source-id>.url · Type: string · Required · Pattern: ^(?:[a-zA-Z][a-zA-Z\d+\-.]*:|\/|\.\.?\/|[^\s:/?#][^:/?#]*(?:[/?#]|$))
URL of the grid file (an image, a JSON header, or a GeoTIFF)
encoding
Section titled “encoding”Path: style.sources.<source-id>.encoding · Type: "rg-uv" | "scalar-r" | "nullschool-json" | "geotiff" · Required
How values are packed: rg-uv (two components in the red and green bytes), scalar-r (one value in the red byte), nullschool-json (header plus data arrays), geotiff (one or two bands)
bounds
Section titled “bounds”Path: style.sources.<source-id>.bounds · Type: [number, number, number, number]
Cell edges as [west, south, east, north], for an image encoding (or use grid:)
Path: style.sources.<source-id>.grid · Type: object
Node geometry, for an image encoding (or use bounds:)
Same shape as sources.<source-id>.grid (type: grid).
Path: style.sources.<source-id>.range · Type: [number, number]
[lo, hi]: the values bytes 0 and 255 stand for (rg-uv and scalar-r only)
Path: style.sources.<source-id>.units · Type: string
Unit of the values, as a label (K, m/s, m …)
nodata
Section titled “nodata”Path: style.sources.<source-id>.nodata · Type: number | object
Which nodes carry no value: { channel, below | above | equals } for an image encoding, a number for geotiff
Same shape as sources.<source-id>.nodata (type: grid).
Path: style.sources.<source-id>.bands · Type: number[]
GeoTIFF band indices to read: [value] or [u, v] (geotiff only)
attribution
Section titled “attribution”Path: style.sources.<source-id>.attribution · Type: string
Attribution text for the data
runtime
Section titled “runtime”Path: style.sources.<source-id>.runtime · Type: object
Per-source live-data configuration
Same shape as style.sources.<source-id>.runtime (type: vector).
layers
Section titled “layers”Path: style.layers · Type: object[] · Default: []
Map layers, each with an optional nested runtime:
One of 10 variants, selected by type: circle, line, fill, symbol, raster, fill-extrusion, heatmap, hillshade, color-relief, background.
Common fields
Section titled “Common fields”Accepted by every variant that lists them below.
Path: style.layers[].id · Type: string · Required
Unique layer identifier
Path: style.layers[].label · Type: string
Human-readable layer label
source
Section titled “source”Path: style.layers[].source · Type: string | object
Layer source: a named-source string ref, or an inline v2 source (nested runtime:, strict RFC 7946 data)
Object form: same shape as style.sources.<source-id>.
source-layer
Section titled “source-layer”Path: style.layers[].source-layer · Type: string
Source layer name (for vector sources)
minzoom
Section titled “minzoom”Path: style.layers[].minzoom · Type: number · Range: 0 to 24
Minimum zoom level to show layer
maxzoom
Section titled “maxzoom”Path: style.layers[].maxzoom · Type: number · Range: 0 to 24
Maximum zoom level to show layer
filter
Section titled “filter”Path: style.layers[].filter · Type: array
MapLibre filter expression
visible
Section titled “visible”Path: style.layers[].visible · Type: boolean · Default: true
Initial visibility state
toggleable
Section titled “toggleable”Path: style.layers[].toggleable · Type: boolean · Default: true
Allow users to toggle visibility
before
Section titled “before”Path: style.layers[].before · Type: string
Layer ID to insert this layer before
interactive
Section titled “interactive”Path: style.layers[].interactive · Type: object
Interactive event configuration
Same shape as layers[].interactive.
legend
Section titled “legend”Path: style.layers[].legend · Type: object | false
This layer’s legend entry, or false to leave it (and its classify classes) out of the legend
Same shape as layers[].legend.
effect
Section titled “effect”Path: style.layers[].effect · Type: object
Experimental: a registered shader effect (type + flat params) that enhances this layer; the layer itself is the static fallback
Same shape as layers[].effect.
classify
Section titled “classify”Path: style.layers[].classify · Type: object
Thematic classes for this layer: compiles to a MapLibre step (numeric) or match (categories) expression
Same shape as layers[].classify.
metadata
Section titled “metadata”Path: style.layers[].metadata · Type: map of any
Custom metadata
runtime
Section titled “runtime”Path: style.layers[].runtime · Type: object
Per-layer experience configuration
interactive
Section titled “interactive”Path: style.layers[].runtime.interactive · Type: object
Interactive event configuration
Same shape as layers[].interactive.
legend
Section titled “legend”Path: style.layers[].runtime.legend · Type: object | false
This layer’s legend entry, or false to leave it (and its classify classes) out of the legend
Same shape as layers[].legend.
Path: style.layers[].runtime.label · Type: string
Human-readable layer label
toggleable
Section titled “toggleable”Path: style.layers[].runtime.toggleable · Type: boolean
Allow users to toggle visibility
effect
Section titled “effect”Path: style.layers[].runtime.effect · Type: object
Experimental: a registered shader effect (type + flat params) that enhances this layer; the layer itself is the static fallback
Same shape as layers[].effect.
extends
Section titled “extends”Path: style.layers[].extends · Type: any
Reserved — layer inheritance (v2). The key name is claimed; the semantics are not defined and the value is unread.
type: circle
Section titled “type: circle”Common fields: id, label, source, source-layer, minzoom, maxzoom, filter, visible, toggleable, before, interactive, legend, effect, classify, metadata, runtime, extends.
Path: style.layers[].type · Type: "circle" · Required
Layer type
Path: style.layers[].paint · Type: object
Circle paint properties
Same shape as layers[].paint (type: circle).
layout
Section titled “layout”Path: style.layers[].layout · Type: object
Circle layout properties
Any other MapLibre layout property valid for this layer type is accepted as well; the MapLibre style spec is the reference for each property’s semantics.
type: line
Section titled “type: line”Common fields: id, label, source, source-layer, minzoom, maxzoom, filter, visible, toggleable, before, interactive, legend, effect, classify, metadata, runtime, extends.
Path: style.layers[].type · Type: "line" · Required
Layer type
Path: style.layers[].paint · Type: object
Line paint properties
Same shape as layers[].paint (type: line).
layout
Section titled “layout”Path: style.layers[].layout · Type: object
Line layout properties
Same shape as layers[].layout (type: line).
type: fill
Section titled “type: fill”Common fields: id, label, source, source-layer, minzoom, maxzoom, filter, visible, toggleable, before, interactive, legend, effect, classify, metadata, runtime, extends.
Path: style.layers[].type · Type: "fill" · Required
Layer type
Path: style.layers[].paint · Type: object
Fill paint properties
Same shape as layers[].paint (type: fill).
layout
Section titled “layout”Path: style.layers[].layout · Type: object
Fill layout properties
Same shape as layers[].layout (type: fill).
type: symbol
Section titled “type: symbol”Common fields: id, label, source, source-layer, minzoom, maxzoom, filter, visible, toggleable, before, interactive, legend, effect, classify, metadata, runtime, extends.
Path: style.layers[].type · Type: "symbol" · Required
Layer type
layout
Section titled “layout”Path: style.layers[].layout · Type: object
Symbol layout properties
Same shape as layers[].layout (type: symbol).
Path: style.layers[].paint · Type: object
Symbol paint properties
Same shape as layers[].paint (type: symbol).
type: raster
Section titled “type: raster”Common fields: id, label, source, source-layer, minzoom, maxzoom, filter, visible, toggleable, before, interactive, legend, effect, classify, metadata, runtime, extends.
Path: style.layers[].type · Type: "raster" · Required
Layer type
Path: style.layers[].paint · Type: object
Raster paint properties
Same shape as layers[].paint (type: raster).
layout
Section titled “layout”Path: style.layers[].layout · Type: object
Raster layout properties
Any other MapLibre layout property valid for this layer type is accepted as well; the MapLibre style spec is the reference for each property’s semantics.
type: fill-extrusion
Section titled “type: fill-extrusion”Common fields: id, label, source, source-layer, minzoom, maxzoom, filter, visible, toggleable, before, interactive, legend, effect, classify, metadata, runtime, extends.
Path: style.layers[].type · Type: "fill-extrusion" · Required
Layer type
Path: style.layers[].paint · Type: object
Fill extrusion paint properties
Same shape as layers[].paint (type: fill-extrusion).
layout
Section titled “layout”Path: style.layers[].layout · Type: object
Fill extrusion layout properties
Any other MapLibre layout property valid for this layer type is accepted as well; the MapLibre style spec is the reference for each property’s semantics.
type: heatmap
Section titled “type: heatmap”Common fields: id, label, source, source-layer, minzoom, maxzoom, filter, visible, toggleable, before, interactive, legend, effect, classify, metadata, runtime, extends.
Path: style.layers[].type · Type: "heatmap" · Required
Layer type
Path: style.layers[].paint · Type: object
Heatmap paint properties
Same shape as layers[].paint (type: heatmap).
layout
Section titled “layout”Path: style.layers[].layout · Type: object
Heatmap layout properties
Any other MapLibre layout property valid for this layer type is accepted as well; the MapLibre style spec is the reference for each property’s semantics.
type: hillshade
Section titled “type: hillshade”Common fields: id, label, source, source-layer, minzoom, maxzoom, filter, visible, toggleable, before, interactive, legend, effect, classify, metadata, runtime, extends.
Path: style.layers[].type · Type: "hillshade" · Required
Layer type
Path: style.layers[].paint · Type: object
Hillshade paint properties
Same shape as layers[].paint (type: hillshade).
layout
Section titled “layout”Path: style.layers[].layout · Type: object
Hillshade layout properties
Any other MapLibre layout property valid for this layer type is accepted as well; the MapLibre style spec is the reference for each property’s semantics.
type: color-relief
Section titled “type: color-relief”Common fields: id, label, source, source-layer, minzoom, maxzoom, filter, visible, toggleable, before, interactive, legend, effect, classify, metadata, runtime, extends.
Path: style.layers[].type · Type: "color-relief" · Required
Layer type (maplibre-gl >= 5.6)
Path: style.layers[].paint · Type: object
Color-relief paint properties
Same shape as layers[].paint (type: color-relief).
layout
Section titled “layout”Path: style.layers[].layout · Type: object
Color-relief layout properties
Any other MapLibre layout property valid for this layer type is accepted as well; the MapLibre style spec is the reference for each property’s semantics.
type: background
Section titled “type: background”Common fields: runtime, extends, source.
Path: style.layers[].id · Type: string · Required
Unique layer identifier
Path: style.layers[].type · Type: "background" · Required
Layer type
Path: style.layers[].paint · Type: object
Background paint properties
Same shape as layers[].paint (type: background).
layout
Section titled “layout”Path: style.layers[].layout · Type: object
Background layout properties
Any other MapLibre layout property valid for this layer type is accepted as well; the MapLibre style spec is the reference for each property’s semantics.
metadata
Section titled “metadata”Path: style.layers[].metadata · Type: map of any
Custom metadata
runtime
Section titled “runtime”Type: object · Default: {}
The runtime half
Path: runtime.map · Type: object · Default: {}
MapLibre Map constructor options
interactive
Section titled “interactive”Path: runtime.map.interactive · Type: boolean · Default: true
Enable map interaction
bounds
Section titled “bounds”Path: runtime.map.bounds · Type: [number, number, number, number] | [[number, number], [number, number]]
Fit the initial camera to these bounds: [west, south, east, north] or [[west, south], [east, north]] (longitude first)
maxBounds
Section titled “maxBounds”Path: runtime.map.maxBounds · Type: [number, number, number, number] | [[number, number], [number, number]]
Maximum geographic bounds, in either bounds form
controls
Section titled “controls”Path: runtime.controls · Type: object
Map controls
Same shape as controls.
legend
Section titled “legend”Path: runtime.legend · Type: object | false
Legend configuration. A map with a classify: layer gets one automatically; false turns the legend off
position
Section titled “position”Path: runtime.legend.position · Type: "top-left" | "top-right" | "bottom-left" | "bottom-right" · Default: "top-left"
Legend position
Path: runtime.legend.title · Type: string
Legend title
collapsed
Section titled “collapsed”Path: runtime.legend.collapsed · Type: boolean · Default: false
Start collapsed
Path: runtime.legend.items · Type: object[]
Custom legend items (overrides layer legends)
Path: runtime.legend.items[].color · Type: string · Required
Item color
Path: runtime.legend.items[].label · Type: string · Required
Item label
Path: runtime.legend.items[].shape · Type: "circle" | "square" | "line" | "icon" · Default: "square"
Symbol shape
Path: runtime.legend.items[].icon · Type: string
Icon name/URL (for shape: icon)
parameters
Section titled “parameters”Path: runtime.parameters · Type: map of object
Presentation metadata for state keys — label, type, range
Same shape as parameters.
markers
Section titled “markers”Path: runtime.markers · Type: object[]
Standalone markers — DOM pins live, symbol layers + sprite on export
Same shape as markers.
Path: runtime.fitTo · Type: string | object
Fit the initial camera to a source’s data: GeoJSON, FlatGeobuf, GeoParquet or COG (v1: config.fitTo)
Same shape as config.fitTo.
popups
Section titled “popups”Path: runtime.popups · Type: object[]
Standalone popups open at a coordinate — no layer, no marker
Same shape as popups.
container
Section titled “container”Path: runtime.container · Type: object
Map container presentation (v2 home of v1’s style:/className:)
Path: runtime.container.style · Type: string
Inline CSS styles for the map container
className
Section titled “className”Path: runtime.container.className · Type: string
CSS class name for the map container
Type: map of object
Runtime-tunable values (may live here or under style:)
Same shape as state.
parameters
Section titled “parameters”Type: map of object
Presentation metadata for state keys (may live here or under runtime:)
Same shape as parameters.