Create a Deck.GL map. Rendering the mapbox basemap requires a mapbox account and mapbox access token.
Usage
rdeck(
map_style = mapbox_dark(),
theme = "kepler",
initial_bounds = NULL,
initial_view_state = view_state(center = c(0, 0), zoom = 1),
controller = TRUE,
picking_radius = 0,
use_device_pixels = TRUE,
blending_mode = "normal",
layer_selector = TRUE,
editor = FALSE,
lazy_load = deprecated(),
width = NULL,
height = NULL,
id = NULL,
...
)
Arguments
- map_style
<
string
> The mapbox basemap style url. See https://docs.mapbox.com/api/maps/#mapbox-styles- theme
<
"kepler"
|"light"
> The widget theme which alters the style of the legend and tooltips.- initial_bounds
<
rct
/st_bbox
/wk-geometry
> Sets the initial bounds of the map if notNULL
. Takes priority overinitial_view_state
. Accepts a bounding box, or a geometry from which a bounding box can be computed. Requires CRS EPSG:4326.- initial_view_state
<
view_state
> Defines the map position, zoom, bearing and pitch.- controller
<
logical
> IfNULL
orFALSE
, the map is not interactive.- picking_radius
<
number
> Extra pixels around the pointer to include while picking; useful when rendering objects that are difficult to hover, e.g. thin lines, small points, etc.- use_device_pixels
<
logical
|number
> Controls the resolution of drawing buffer used for rendering.TRUE
: Resolution is defined bywindow.devicePixelRatio
. On Retina/HD displays, this resolution is usually twice as big asCSS pixels
resolution.FALSE
:CSS pixels
resolution is used for rendering.number
: Custom ratio (drawing buffer resolution toCSS pixel
) to determine drawing buffer size. A value less than1
uses resolution smaller thanCSS pixels
, improving rendering performance at the expense of image quality; a value greater than1
improves image quality at the expense of rendering performance.
- 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.
- layer_selector
<
boolean
> IfTRUE
, the layer selector control will be enabled and layers withvisibility_toggle = TRUE
may be toggled. IfFALSE
, the layer selector control won't be rendered.- editor
<
boolean
|editor_options
> Whether to render the polygon editor. IfTRUE
, renders with the defaulteditor_options()
. IfFALSE
, the polygon editor is not rendered.- lazy_load
- width
<
number
> The width of the map canvas.- height
<
number
> The height of the map canvas.- id
<
string
> The map element id. Not used in shiny applications.- ...
Additional parameters that will be forwarded to deck.gl javascript without validation nor processing. All dots must be named and will be
camelCased
when serialised. A warning is raised when dots are used, warning classrdeck_dots_nonempty
.