add_bitmap_layer: Add a bitmap layer to the deckgl widget

View source: R/layers_bitmap-layer.R

add_bitmap_layerR Documentation

Add a bitmap layer to the deckgl widget

Description

Add a bitmap layer to the deckgl widget

Usage

add_bitmap_layer(
  deckgl,
  image = NULL,
  properties = list(),
  ...,
  id = "h3-hexagon-layer"
)

Arguments

deckgl

A deckgl widget object.

image

image

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.

Examples

image <- paste0(
  "https://raw.githubusercontent.com/",
  "uber-common/deck.gl-data/master/",
  "website/sf-districts.png"
)
bounds <- c(-122.5190, 37.7045, -122.355, 37.829)

deck <- deckgl() %>%
  add_bitmap_layer(image = image, bounds = bounds) %>%
  add_basemap()

if (interactive()) deck

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