Text Layer
A label per row from a string column.
Syntax
{ "id": "n1", "op": "text", "name": "text", "x": 0, "y": 0, "params": {} }
An edge into it ends at "targetPort": "in"; one out of it starts at "sourcePort": "out"; a parameter is set in params (leave out the ones at their default), driven by an edge to par:maxRows, or read elsewhere as ch('text/maxRows').
Inputs
| Port | Type | Takes |
|---|---|---|
in | table | one edge |
Parameters
| Parameter | Kind | Default | Choices |
|---|---|---|---|
position | expr | "P" | |
text | column | "name" | |
color | expr | "" | |
sizeBy | expr | "" | |
borderColorChannel | expr | "" | |
borderWidthBy | expr | "" | |
angleBy | expr | "" | |
offsetBy | expr | "" | |
anchorBy | column | "" | |
baselineBy | column | "" | |
maxRows | int | 0 | |
ramp | menu | "viridis" | 37 choices |
size | float | 12 | |
sizeUnits | menu | "pixels" | pixels, meters, common |
textColor | color | [230,230,230] | |
sizeScale | float | 1 | |
sizeMinPixels | float | 0 | |
sizeMaxPixels | float | 0 | |
offsetX | float | 0 | |
offsetY | float | -12 | |
angle | float | 0 | |
anchor | menu | "middle" | start, middle, end |
baseline | menu | "center" | top, center, bottom |
fontFamily | string | "ui-monospace, SF Mono, Menlo, monospace" | |
fontWeight | float | 400 | |
billboard | toggle | true | |
lineHeight | float | 1 | |
wordBreak | menu | "break-word" | break-word, break-all |
maxWidth | float | 0 | |
outlineWidth | float | 2 | |
outlineColor | color | [8,9,13] | |
background | toggle | false | |
backgroundColor | color | [255,255,255] | |
backgroundPadding | float | 0 | |
borderColor | color | [0,0,0] | |
borderWidth | float | 0 | |
backgroundBorderRadius | float | 0 | |
opacity | float | 1 | |
blend | menu | "normal" | normal, additive, subtractive |
depthTest | toggle | true | |
depthWrite | toggle | true | |
extensions | field | [] |
Outputs
| Port | Type |
|---|---|
out | layer |
Details
- Category: Layers
- Operator:
text
Older projects
Projects saved before documents used operator classes. These convert to text when they open: GeoJsonLayerOp, TextLayerOp.