add_cesium {mapdeck} | R Documentation |
Add Cesium
Description
Renders 3D tiles data from Cesium ION assets. To use this layer you need a Cesium ION account https://cesium.com/learn/cesiumjs-learn/cesiumjs-quickstart/#your-first-app. This layer is experimental
Usage
add_cesium(map, data, point_size = 2, layer_id = NULL, ion_token = NULL)
Arguments
map |
a mapdeck map object |
data |
data to be used in the layer. All coordinates are expected to be EPSG:4326 (WGS 84) coordinate system |
point_size |
size of point in pixels |
layer_id |
single value specifying an id for the layer. Use this value to distinguish between shape layers of the same type. Layers with the same id are likely to conflict and not plot correctly |
ion_token |
ion asset token |
Examples
## Melbourne point cloud
ion_asset <- 43978
ion_token <- "ION_TOKEN"
tile_data <- paste0("https://assets.ion.cesium.com/",ion_asset,"/tileset.json")
mapdeck(
location = c(144.95, -37.82)
, zoom = 14
, pitch = 60
) %>%
add_cesium(
data = tile_data
, ion_token = ion_token
)
[Package mapdeck version 0.3.5 Index]