Defines functions add_source

Documented in add_source

#' Add a data source to the deckgl widget
#' @inheritParams add_layer
#' @param id The unique id of the source.
#' @example inst/examples/deckgl-api-reference/sources.R
#' @export
add_source <- function(deckgl, id, data) {
  if (inherits(data, "sf")) data <- modify_sf(data)
  invoke_method(deckgl, "addSource", id = id, data = data, convertData = inherits(data, "data.frame"))

Try the deckgl package in your browser

Any scripts or data that you put into this service are public.

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