{"word_count": 306, "character_count": 2058}
A new version of the cartography package (v2.4.0) has arrived on CRAN.New FeatureswaffleLayer() plots a "waffle map". This kind of representation allows to plot several quantities on the same map.ghostLayer() is a short function that plot an invisible layer with the extent of a spatial object. This function is useful to initiate a map with a specific extent.library(sf)library(cartography)mtq &#60;- st_read(system.file("gpkg/mtq.gpkg",      package="cartography"))target &#60;- mtq[30, ]ghostLayer(target)plot(st_geometry(mtq), col = "gold2", add = TRUE)hatchedLayer() plots a hatched layer, several patterns are available.getPngLayer() import a PNG image and cut it using the shape of a spatial object.wordcloudLayer() plots a word cloud adjusted to an sf object.These 3 functions are well described by their creator, Diego Hernangómez, on his blog.EnhancementsgetTiles() gets map tiles from various tile servers.&#160;The function has gained caching capacities (through cachedir and forceDownload arguments). Users can now cache tiles in a folder and reuse them across R sessions.More than 50 tile servers have been included and other can be added by users.&#160;It is possible to use Thunderforest tiles with an API key.click here to see the figure in a better resolutionThe barscale() function plots a scale bar on a map, a new unit argument has been added to plot the scale bar in meters, kilometers or miles.Under the Hoodcartography does not use rosm anymore to import map tiles. The package is working great but its maintainer, Dewey Dunnington, suggests that it will not evolve much and that other package will appear to replace it. Thus we have decided to use slippymath and internal code to download tiles. A (positive) side effect of this replacement is a decrease in the indirect dependancies of cartography.cartography appears to be robust to the changes introduced by the last sf version (v0.9). This version takes into account the new representation of coordinate reference systems proposed by GDAL and PROJ. More information on this here.