Column Layer
Usage
add_column_layer(
rdeck,
...,
id = uuid::UUIDgenerate(),
name = "ColumnLayer",
group_name = NULL,
data = NULL,
visible = TRUE,
pickable = FALSE,
opacity = 1,
wrap_longitude = FALSE,
position_format = "XY",
color_format = "RGBA",
auto_highlight = FALSE,
highlight_color = "#00008080",
disk_resolution = 20,
vertices = NULL,
radius = 1000,
angle = 0,
offset = c(0, 0),
coverage = 1,
elevation_scale = 1,
radius_units = "meters",
line_width_units = "meters",
line_width_scale = 1,
line_width_min_pixels = 0,
line_width_max_pixels = 9007199254740991,
extruded = FALSE,
wireframe = FALSE,
filled = TRUE,
stroked = FALSE,
get_position = position,
get_fill_color = "#000000ff",
get_line_color = "#000000ff",
get_line_width = 1,
get_elevation = 1000,
material = TRUE,
blending_mode = "normal",
visibility_toggle = TRUE,
tooltip = NULL
)
update_column_layer(
rdeck,
...,
id,
name = cur_value(),
group_name = cur_value(),
data = cur_value(),
visible = cur_value(),
pickable = cur_value(),
opacity = cur_value(),
wrap_longitude = cur_value(),
position_format = cur_value(),
color_format = cur_value(),
auto_highlight = cur_value(),
highlight_color = cur_value(),
disk_resolution = cur_value(),
vertices = cur_value(),
radius = cur_value(),
angle = cur_value(),
offset = cur_value(),
coverage = cur_value(),
elevation_scale = cur_value(),
radius_units = cur_value(),
line_width_units = cur_value(),
line_width_scale = cur_value(),
line_width_min_pixels = cur_value(),
line_width_max_pixels = cur_value(),
extruded = cur_value(),
wireframe = cur_value(),
filled = cur_value(),
stroked = cur_value(),
get_position = cur_value(),
get_fill_color = cur_value(),
get_line_color = cur_value(),
get_line_width = cur_value(),
get_elevation = cur_value(),
material = cur_value(),
blending_mode = cur_value(),
visibility_toggle = cur_value(),
tooltip = cur_value()
)Arguments
- rdeck
<
rdeck|rdeck_proxy> An rdeck map instance.- ...
Additional parameters that will be forwarded to deck.gl javascript without validation nor processing. All dots must be named and will be
camelCasedwhen serialised. A warning is raised when dots are used, warning classrdeck_dots_nonempty.- id
<
string> The layer's identifier must be unique for among all layers of the same type for a map. Defaults touuid::UUIDgenerate(), but should be explicitly defined for updatable layers in a shiny application.- name
<
string> Identifies the layer on tooltips and legends. It does not need to be unique, but should be brief. Defaults to the deck.gl class name for the layer.- group_name
<
string> Defines the group that this layer belongs to. Currently only effective on the layer selector, ifvisibility_toggle = TRUE.- data
<
data.frame|sf|string> The layer's data. Data frames and sf objects will contain all columns that are referenced by the layer's accessors. Strings will be interpreted as a URL and data will be retrieved dynamically in the browser.- visible
<
boolean> Determines whether the layer is visible or not; also determines whether any legend elements for the layer will be displayed.- pickable
<
boolean> Determines if the layer responds to pointer / touch events.- opacity
<
number> Determines the layer's opacity.- wrap_longitude
<
boolean> Normalises geometry longitudes.- position_format
<
"XY"|"XYZ"> Determines whether each coordinate has two (XY) or three (XYZ) elements.- color_format
<
"RGB"|"RGBA"> Determines whether the alpha channel of the colours will be ignored by accessors, making all colours opaque.- auto_highlight
<
boolean> WhenTRUE, the current object hovered by the cursor is highlighted byhighlight_color.- highlight_color
<
accessor|scale|color> Whenauto_highlightandpickableare enabled,highlight_colordetermines the colour of the currently highlighted object. If a single colour value is supplied, that colour will be used to highlight all objects in the layer. Per-object highlighting is achieved with a colour scale, or a tidy-eval column of colours.- disk_resolution
<
number> The number of sides to render the disk as. The disk is a regular polygon that fits inside the givenradius. A higher resolution will yield a smoother look close-up, but also need more resources to render.- vertices
matrixReplace the default geometry (regular polygon that fits inside the unit circle) with a custom one. The length of the array must be at leastdisk_resolution. Each vertex is a rowc(x, y)that is the offset from the instance position, relative to the radius.- radius
<
number> The radius of the column in metres.- angle
<
number> The disk rotation, counter-clockwise in radians.- offset
<
number> The disk offset from the position, relative to the radius.- coverage
<
number> Radius multiplier, between 0 - 1. The radius of each disk is calculated bycoverage * radius.- elevation_scale
<
number> The elevation multiplier.- radius_units
<
"pixels"|"common"|"meters"> The units of point radius.- line_width_units
<
"pixels"|"common"|"meters"> The units of outline width. Applied whenextruded == FALSEandstroked == TRUE.- line_width_scale
<
number> The line width multiplier.- line_width_min_pixels
<
number> The minimum line width in pixels.- line_width_max_pixels
<
number> The maximum line width in pixels.- extruded
<
boolean> IfTRUE, extrude objects along the z-axis; ifFALSE, all objects will be flat.- wireframe
<
boolean> IfTRUEandextruded == TRUE, draw a line wireframe of the object. The outline will have horizontal lines closing the top and bottom polygons and vertical lines for each vertex of the polygon.- filled
<
boolean> IfTRUE, draw the filled area of each point.- stroked
<
boolean> IfTRUE, draw an outline around each object.- get_position
<
accessor> The feature positions. A<point/multipoint>wk-geometry column with CRS EPSG:4326. Supports tidy-eval.- get_fill_color
<
accessor|scale|color> The fill colour of each object. Accepts a single colour value, a colour scale, or a tidy-eval column of colours.- get_line_color
<
accessor|scale|color> The line colour of each object. Accepts a single colour value, a colour scale, or a tidy-eval column of colours.- get_line_width
<
accessor|scale|number> The outline of the object in units specified byline_width_units. Accepts a single numeric value, a numeric scale, or a tidy-eval column of numbers.- get_elevation
<
accessor|scale|number> The elevation to extrude each object in the z-axis. Height units are in metres. Accepts a single numeric value, a numeric scale, or a tidy-eval column of numbers.- material
<
boolean>- blending_mode
<
"normal"|"additive"|"subtractive"> Sets the blending mode. Blending modes:normal: Normal blending doesn't alter colours of overlapping objects.additive: Additive blending adds colours of overlapping objects. Useful for highlighting dot density on dark maps.subtractive: Subtractive blending darkens overlapping objects. Useful for highlighting dot density on light maps.
- visibility_toggle
<
boolean> Whether this layer will appear in the layer selector.- tooltip
<
tooltip> Defines the columns (and their order) that will be displayed in the layer tooltip, ifpickable == TRUE. Supports tidy-select if adatais adata.frame. Geometry columns are always removed.
See also
https://github.com/visgl/deck.gl/blob/8.7-release/docs/api-reference/layers/column-layer.md
Other core-layers:
arc_layer,
bitmap_layer,
geojson_layer,
grid_cell_layer,
icon_layer,
line_layer,
path_layer,
point_cloud_layer,
polygon_layer,
scatterplot_layer,
solid_polygon_layer,
text_layer
Other layers:
arc_layer,
bitmap_layer,
contour_layer,
cpu_grid_layer,
geojson_layer,
gpu_grid_layer,
great_circle_layer,
grid_cell_layer,
grid_layer,
h3_cluster_layer,
h3_hexagon_layer,
heatmap_layer,
hexagon_layer,
icon_layer,
line_layer,
mvt_layer,
path_layer,
point_cloud_layer,
polygon_layer,
quadkey_layer,
s2_layer,
scatterplot_layer,
scenegraph_layer,
screen_grid_layer,
simple_mesh_layer,
solid_polygon_layer,
terrain_layer,
text_layer,
tile_3d_layer,
tile_layer,
trips_layer