The viz_tile function adds raster zoomable tiles to a map
It requires a Mercator projection.
Usage
viz_tile(
map,
id = NULL,
tileSize = 512,
zoomDelta = 1,
opacity = 1,
url = "openstreetmap",
clipPath = NULL
)Arguments
- map
A
geovizmap created withviz_create.- id
character. Optional. Unique layer id.
- tileSize
numeric. Optional. Tile size (default 512).
- zoomDelta
numeric. Optional. Zoom offset (default 1).
- opacity
numeric. Optional. Tile opacity (default 1).
- url
function or character. Optional. Tile source URL or preset ("openstreetmap", "opentopomap", "worldterrain", "worldimagery", "worldStreet", "worldphysical", "shadedrelief", "stamenterrain", "cartodbvoyager", "stamentoner", "stamentonerbackground", "stamentonerlite", "stamenwatercolor", "hillshade", "worldocean", "natgeo").
- clipPath
character. Optional. SVG clip-path definition (e.g. "url(#myclipid)").
Examples
viz_create(projection = "mercator") |>
viz_tile(url = "worldphysical") |>
viz_render()