Description Usage Arguments Examples
View source: R/map_layer_tile3d.R
Renders 3D tiles data from Cesium ION assets. To use this layer you need a Cesium ION account https://cesium.com/docs/tutorials/getting-started/#your-first-app. This layer is experimental
1 | add_cesium(map, data, point_size = 2, layer_id = NULL, ion_token = NULL)
|
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 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Melbourne point cloud
ion_asset <- 43978
ion_token <- "ION_TOKEN"
tile_data <- paste0("https://assets.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
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.