Style support
mapterm reads MapLibre style documents. A terminal cell has a character, a foreground color and a background color, so only the properties that map onto those are used.
Layers and properties
Section titled “Layers and properties”| Layer type | Paint | Layout |
|---|---|---|
background |
background-color, background-opacity |
visibility |
fill |
fill-color, fill-opacity, fill-outline-color |
visibility |
line |
line-color, line-opacity, line-width (1 to 3 dots thick), line-dasharray (dotted) |
visibility |
circle |
circle-color, circle-opacity |
visibility, mapterm:glyph |
symbol |
text-color, text-opacity, icon-color, icon-opacity |
visibility, text-field, text-font (bold, italic), text-transform, text-anchor, text-variable-anchor, text-offset, symbol-placement, symbol-spacing, symbol-sort-key, icon-image (as a one-cell glyph), mapterm:glyph |
raster |
raster-opacity (blended with the background in cell-color mode) |
visibility |
Every layer also uses source, source-layer, filter, minzoom and
maxzoom.
Skipped
Section titled “Skipped”line-blur,line-gap-widthand casings: a braille line is one to three dots wide, with no room for an outline. Widths and dash patterns are evaluated at the tile’s zoom.- Sprite images (known
icon-imagenames become one-cell symbols instead), patterns, and glyph fonts beyond bold and italic. fill-extrusion(3D),hillshade,heatmap, and terrain.- Text halos, offsets and sizes.
Sources
Section titled “Sources”| Source type | |
|---|---|
vector |
url (TileJSON or pmtiles://) or tiles templates; promoteId; attribution |
geojson |
Inline data, or data as a URL; cluster, clusterRadius, clusterMaxZoom; promoteId; attribution |
raster |
tiles templates, a TileJSON url, or pmtiles:// |
raster-dem, image and video sources are skipped with a warning.
mapbox:// URLs need Mapbox’s API; use the https:// URL instead.
A source’s attribution (or its TileJSON or PMTiles metadata) is shown in the
viewer’s status bar while its layers are drawn.
Expressions
Section titled “Expressions”See Expressions for the supported operators,
including feature-state. An
unsupported expression is an error for that one property: it falls back to the
default, or for a filter the layer is hidden, and a warning is recorded
(Map::warnings, or the MAPTERM_LOG file in the viewer).
The mapterm:glyph extension
Section titled “The mapterm:glyph extension”The character drawn for a point: ● by default for circles. Symbols draw it
before their text; without it, a known icon-image (hospital, airport,
restaurant, bus stop, …) becomes a one-cell symbol, else they show only
text. Any string expression works:
{ "id": "stops", "type": "circle", "source": "transit", "layout": { "mapterm:glyph": ["match", ["get", "mode"], "rail", "◆", "•"] } }