tm_scale_intervals(style = "sd") (#509): a middle interval around the mean, labels in standard deviations, and a diverging palette. See tm_scale_intervals()tm_labels() (#850): labels that do not fit are wrapped, rotated, shrunk, or moved outside with a leader line. See tm_placement() and the article "Label placement"opt_tm_labels(): point.label* and remove_overlap are deprecated (use tm_placement())tm_patterns() and the articles "Fill patterns", "Textures for uncertainty", and "Dot density map"tm_legend_cross(): a grid legend of two map variables, e.g. pattern and filltm_scale_continuous_area() and tm_scale_continuous_volume() (with perceptual)lwd now also ranges from 0 to 3, classes of size and lwd no longer start at 0, values.range is relative (as documented), and tm_seq() takes the first and last visual values. Use tm_style("v4.4") to reproduce maps of tmap 4.0 to 4.4tm_style(c("cobalt", "v4.4"))fill or col now use the constant color of the layerscale was applied to data-driven transparency in some scalestm_map_colors() to configure "MAP_COLORS", e.g. tm_polygons(fill = tm_map_colors(6, permutation = 1)). The number of colors now follows the palette instead of always being 7, which gave adjacent polygons the same fill when the palette had fewer colors. Needs tmaptools 3.4tm_text(col = "auto") (and tm_labels()): black or white text depending on the color underneath (the fill of the polygon layer below, the label background, or the map background), as in tmap v3api in tm_basemap() working for CARTO basemaps (API keys are required since August 2026)"Esri.WorldDarkGrayCanvas", now used by the style "cobalt" (CARTO basemaps require an API key)tmap.glyphs::tm_donuts()tm_labels() dropped most polygon labels when a basemap was showntm_labels(): polygons that cross the map frame are labeled at the center of their visible partWorld_rivers, e.g. "Senegal" (was "Sngal")point_per = "largest" in tm_text() and tm_labels() gave an error for linesuse_circle_markers, could not be set or retrieved with tmap_options()tm_view(smooth_factor) for the simplification of polygons and lines when zooming (#727)tm_view(hover.text.size) sets the font size of hover labels (#1193)group.control = "radio" (it hid the data layers)group.control = "radio"/"check") not showing when the widget first renders inside a hidden container, e.g. an inactive Quarto/bslib dashboard tab (#1256)fancy_breaks() error ("missing value where TRUE/FALSE needed") when a numeric column with NA uses large values that trigger the big.num.abbr abbreviation path, e.g. when formatting popups in view mode (#1259)tm_scale_intervals(label.style = "continuous") shows one solid block per class (equal size, as in plot mode) with the breaks labeled at the block boundaries, also in landscape orientation (it used to be a blended gradient with the breaks placed by value)tmap_save(): argument in.iframe deprecated (and ignored), and widgetframe removed from Suggests because of a known security vulnerability (#1268)tmap_save() now shows the underlying error when saving an interactive map fails (e.g. missing pandoc for selfcontained = TRUE)xlab is wider than the item columns (it used to run outside the legend frame)tm_circles() (circles with fixed unit-based radii)blend argument to all layershitbox to tm_lines() and tm_symbols() for view mode (so hovering and clicking also works well for small objects)tmap_mode_pool() to restrict which modes are cycled by ttm() and rtm(), e.g. library(tmap.mapgl); tmap_mode_pool(c("plot", "maplibre"))stars_proxy when changed after evaluationtm_crs() can take bbox and tmaptools::bb argumentstmap_arrange() (for interactive modes)tm_text(): halo, shadow and background rectangles implemented in plot and view modetm_scalebar(): improved measurement (using ellipsoidal distance rather than Eucledian distances in projected crs)tmap_save() can also save in other modes (e.g. from tmap.mapgl)tm_insets(): inset maps, ggplot2 plots etc. exceptedtm_minimap() for plot modetmap_overview() added, which provides an overview of all map elements (layers and components)tm_layout() arguments limited to the useful onestm_components() (was tm_comp_group) improved: now also applicable to map component functionsbbox added to tm_crs(). Special value is "FULL" which refers to the whole earthThis fixes a few regressions in the tmap v4 release and adds improvements.
tmap_providers() (#1041, #1042)tm_comp_group() added to specify grouped components (incl legends)tm_animate() (main use case: cartograms)bg/bg.color and frame/frame.colortm_remove_layer() works again in Shiny (#1044)tm_logo() works again in view mode (#1038).tmap v4 is a major release and has been rewritten from scratch. It contains tons of new features. Although we did our best to make changes backwards compatible, some things may not work as expected.
tm_symbols() have been reorganized. Visual variables are used with explicit scales, legends, and charts.fill is the visual variable for fill color and col for border color.rivers has been renamed to World_rivers due to the name clash with rivers from datasets.NLD_prov, NLD_muni, and (new) NLD_dist (district level) have been included with new demographic variables.land has included color tablestmap_save()Worlds has been fixed (it is now 's2' proof, see GitHub issue #564)popup.format to control whether html code is escaped in view popupstmap_grob() added, which exports tmap plots to grob objects (grid package)SpatRaster objects (terra package) supportedtmap_animation() improved: now using av and gifski under the hood; added progress bar; lists of tmap objects supported; improved default settingstmapOutput(); it now works with reactive shiny objectstmap_save())tmap_design_mode(); tmap.design.mode is now a global option (and not a tmap option anymore)leafetshow.warnings to tmap_options()width argument to tm_credits()tm_text() improved: added "id" argument, and tm_remove_layer() can be applied to ittmap_options(projection = 0, basemaps = NULL)tm_mouse_coordinates() to show mouse coordinates in view modetmap_design_mode() to toggle the design mode.selfcontained to tmap_save()tm_add_legend(): added type = "title" for title only legend elementsttmp() which shows the last map in the other mode.as.count argument added to layer functions; numeric variables can be treated as count variables (integers)classInt::classIntervals()"epsg/proj4strings" in examplessf objectstmapOutput(), renderTmap(), tmapProxy(), and, tm_remove_layer()tmap_save() (regarding default values)tm_rgb() (added r g b and max.value arguments)tm_graticules()group = NULLmapview by leafsynctm_rgb()bbox argument to qtm()tmap_arrange() can take a list of tmap objectstm_sf() which draws sf objects*_tmap() functions (e.g. save_tmap()) to tmap_*() for consistencytm_basemap() and tm_tiles(): now, multiple (overlay) tiled maps can be showntmap_options(), tmap_style(), tmap_format(), tm_style() and tm_format()filter argument to tm_shape() and added colorNULL to layer functionstm_minimap()remove.NA.facets to tm_facets()tmap_animation() enhanced with loop optionstmap_tips()tm_fill()text.align and text.to.columns to legend.formatlegend.(aes).reverse added to the layer functionsfree.coords and drop.units in tm_facets()dismo::gmap() raster shapestm_scale_bar(), tm_text(), and tm_grid() now supported in view mode (requires leaflet 1.1.0)along argument to tm_facets(), which enables faceting along multiple pages (or animation frames)main.title argument to tm_layouttmap_options(), including the new option tmap.unit ("metric" or "imperial"")tm_rgb() (shortcut for rgb rasters)qtm() called without argumentstmap_arrange() for arranging custom small multiplessimplify argument to tm_shape()tm_shape(), set_projection), and as.CRS is added to get_projection and get_proj4.tm_symbols() added, to create proportional symbol maps: besides bubbles, it also supports other symbol shapes, png icons, and small ggplot2 plotstmaptools::rev_geocode_OSM() addedtm_logo() addedpopup.vars to base layer functionsbbox in tm_shape()) working in view modetmaptools::geocode_OSM() improved: a SpatialPointsDataFrame can now be returnedlast_tmap() added, which retrieves the last produced maptm_raster()legend.height and legend.width)interval.closure added to layer functions to determine where intervals are closedjust argument as anchor for text labels, legend and attributes positiontm_xlab() and tm_ylab()raster::crop()geocode_OSM(), a function to find coordinates (now tmaptools::geocode_OSM())double_line and offset_linesave_tmaptm_layouts()'s design.mode outputlwd parameter added to tm_scale_bar() and tm_compass()bb bug"+init=epsg:28992", since the latter now has a "+towgs" itemprint.tmap() returned objectread_osm(), a function to read Open Street Map data (now tmaptools::read_osm())bb, a handy bounding box functiontm_compass())size and colWorldstyle="cat", "cont", and "order")save_tmap()free.coords and drop.shapes of tm_facets() workingviewport bug?tmap for a structured overview of all tmap functionstm_credits() and tm_scale_bar()is.master argument to tm_shape(), that determines which shape is the masterunit and unit.size arguments to tm_shape() that correlates the coordinates with the desired unitstm_polygons(), which is a combination of tm_fill() and tm_borders()tm_raster()tm_layout())crop_shape(), since raster::crop() does the same job, but, but fasterscale parameter (global scale set in tm_layout())tm_facets()) with respect to scaling and free coordinate scalesalpha argument to tm_layers() for transparencysplit() to split a shape object and sbind() to combine shape objects.legend.position = NULLinner.margins and outer.margins. Both can take one value (e.g. outer.margins=0 rather than outer.margins=c(0,0,0,0))qtm(): tm_facets() parameters working, and also fixed scale parameter bugapprox_areas, calc_densitiesouter.margins=0.animation_tmap()