add_layer: Add any kind of layer to the deckgl widget

View source: R/layers.R

add_layerR Documentation

Add any kind of layer to the deckgl widget

Description

Generic function to add any kind of layer to the deckgl widget. Usually you will not use this one but any of the add_*_layer functions instead.

Usage

add_layer(
  deckgl,
  class_name,
  data = NULL,
  properties = list(),
  ...,
  id = "hopeful-hopper",
  tooltip = NULL,
  source = NULL,
  filter = NULL
)

Arguments

deckgl

A deckgl widget object.

class_name

The name of the JavaScript layer class, e. g. ScatterplotLayer.

data

The url to fetch data from or a data object.

properties

A named list of properties with names corresponding to the properties defined in the deckgl-api-reference for the given layer class. The properties parameter can also be an empty list. In this case all props must be passed as named arguments.

...

Named arguments that will be added to the properties object. Identical parameters are overwritten.

id

The unique id of the layer.

tooltip

A tooltip template that defines what should be displayed when the mouse enters an object. You can also pass a list with the properties html and style. See also use_tooltip.

source

The ID of the data source. See add_source.

filter

A filter expression that is applied to the data object.

Value

A deckgl widget object.


deckgl documentation built on March 7, 2023, 5:37 p.m.