Description Usage Arguments Value Note Author(s) See Also Examples
View source: R/00_S3_Definitions.R
Load tiles from OpenStreetMap create and save a .tif file with assembled tiles. The bounding box is automatically retrieved from the GADM shapefile passed as argument. The .tif file is stored in the working directory.
1 2 3 | gadm_getBackground(x, name, type="osm", clip=TRUE)
gadm.getBackground(x, name, type="osm", clip=TRUE) # deprecated
|
x |
Object gadm_sf or gadm_sp (region that you want to add a background). |
name |
character the name of the TIFF file generated by this function. The .tif extension is automaticaly added. |
type |
Character type (default "osm') of the map provided by osm.types(). |
clip |
boolean if TRUE (the default), background is clipped by the the external border of the spatial object. If FALSE, spatial object is drawn upper the background using the full bounding box. |
Object As input, gadm_sf or gadm_sp
gadm.getBackground() is deprecated, it will be removed in the next release. Please use gadm_getBackground()
Jean Pierre Decorps <jp.decorps@epiconcept.fr>
1 2 3 4 5 6 | # library(GADMTools)
# library(rosm)
# FRA = gadm_loadCountries("FRA", 2, basefile = "./")
# BRE = GADMTools::subset(FRA, level=1, regions=c("Bretagne"))
# BRE2 <- gadm_getBackground(BRE, "BRE", "osm")
# plotmap(BRE2, title = "Map of Bretagne (FRANCE)")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.