Description Usage Arguments Value Examples
Adds a layer created using slippy_overlay() or slippy_raster() to a 'ggplot2' chart
1 | ggslippy(slippy_raster, alpha = 1, set_coord_equal = TRUE)
|
slippy_raster |
A raster raster returned by either |
alpha |
Opacity of the raster in 'ggplot2' |
set_coord_equal |
|
a ggplot object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(ggplot2)
library(geoviz)
dem <- example_raster()
dem <- raster::aggregate(dem, 10) #aggregate to speed up ggplot for testing
gg_overlay_image <- slippy_overlay(
dem,
image_source = "stamen",
image_type = "watercolor",
return_png = FALSE,
max_tiles = 2
)
ggplot() +
ggslippy(gg_overlay_image, set_coord_equal = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.