tmap_leaflet: Export tmap to the format of the used graphics mode

View source: R/tmap_leaflet.R

tmap_leafletR Documentation

Export tmap to the format of the used graphics mode

Description

  • tmap_grid() returns a grob object (⁠"plot" mode⁠)

  • tmap_leaflet() a leaflet object ("view" mode).

Usage

tmap_leaflet(x, show = FALSE, ...)

tmap_grid(x, show = FALSE, ...)

Arguments

x

a tmap object.

show

show the map?

...

Arguments passed on to print.tmap

return.asp

should the aspect ratio be returned?

vp

viewport (for "plot" mode)

knit

A logical, should knit?

options

A vector of options

Value

  • tmap_grid() returns a grob object ("plot" mode)

  • tmap_leaflet() a leaflet object ("view" mode). In case small multiples are shown, a list is returned.

Examples

map = tm_shape(World) + tm_polygons()
tmap_leaflet(map, show = TRUE)

r-tmap/tmap documentation built on June 23, 2024, 9:58 a.m.