Deck
The map: layers bottom to top, the basemap, and the camera. Camera fields are props, so a keyframed fly-through costs no queries.
Syntax
{ "id": "n1", "op": "deck", "name": "deck", "x": 0, "y": 0, "params": {} }
An edge into it ends at "targetPort": "layers"; a parameter is set in params (leave out the ones at their default), driven by an edge to par:longitude, or read elsewhere as ch('deck/longitude').
Inputs
| Port | Type | Takes |
|---|---|---|
layers | layer | several, in order |
views | value | several, in order, optional |
effects | value | several, in order, optional |
widgets | value | several, in order, optional |
viewState | value | optional |
maplibreLayers | value | several, in order, optional |
Parameters
| Parameter | Kind | Default | Choices |
|---|---|---|---|
basemap | menu | "dark-matter" | dark-matter, positron, voyager, none |
longitude | float | 0 | |
latitude | float | 20 | |
zoom | float | 1.5 | |
pitch | float | 0 | |
bearing | float | 0 | |
mapStyle | url | "" | |
styleOverrides | text | "" | |
projection | menu | "mercator" | mercator, globe |
sky | toggle | false | |
skyColor | color | [136,198,252] | |
horizonColor | color | [255,255,255] | |
skyHorizonBlend | float | 0.8 | |
atmosphereBlend | float | 0.5 | |
light | toggle | false | |
lightAnchor | menu | "viewport" | viewport, map |
lightAzimuthal | float | 210 | |
lightPolar | float | 30 | |
display | menu | "fixed" | fixed, responsive |
width | int | 1920 | |
height | int | 1080 | |
lod | float | 2 | |
scaleMode | menu | "fit" | fit, manual |
waitForData | toggle | true | |
codec | menu | "avc" | avc, hevc, vp9, av1 |
bitrateMbps | float | 10 | |
bitrateMode | menu | "constant" | constant, variable |
scaleControl | float | 0.3 | |
framerate | int | 30 | |
captureDelay | int | 50 | |
rendersDirectory | string | "renders" | |
exportAlpha | toggle | false | |
captureMode | menu | "final" | final, preview |
sequenceFormat | menu | "png" | png, exr |
Outputs
This operator has no outputs.
Remarks
Deck is the map: what it draws, the basemap under it, the camera and the export settings. The editor shows the first Deck in the document that is not bypassed.
Layers wire into layers, each edge with an index; deck.gl draws them in that order, so the highest index draws on top. Basemap picks a CARTO style, or none for layers with no map under them. A Map style URL, or a Map Style node wired to par:mapStyle, wins over Basemap.
The camera is the Longitude, Latitude, Zoom, Pitch and Bearing parameters. They are deck props, so keyframing them for a fly-through costs no queries, and dragging the map with the Deck selected writes them, as keys when they are keyframed. A View State or Fit Bounds wired to viewState replaces them.
The Export folder sets the render: its Width and Height, the level of detail, and the codec and frame rate of a video.
Examples
The smallest map: one layer over the Positron basemap, framed on San Francisco.
{
"nodes": [
{ "id": "n1", "op": "scatter", "name": "points", "x": 0, "y": 0, "params": { "position": "[lng, lat]" } },
{ "id": "n2", "op": "deck", "name": "deck", "x": 300, "y": 0, "params": { "basemap": "positron", "longitude": -122.42, "latitude": 37.77, "zoom": 11 } }
],
"edges": [{ "id": "e1", "source": "n1", "sourcePort": "out", "target": "n2", "targetPort": "layers", "index": 0 }]
}
Details
- Category: Output
- Operator:
deck
Older projects
Projects saved before documents used operator classes. These convert to deck when they open: BlendingOp, DeckRendererOp, MaplibreBasemapOp, OutOp.