R/shiny_grid.R

Defines functions renderTmapGS.Grid

#' @exportS3Method
renderTmapGS.Grid <- function(x, expr, env, execOnResize, ...) {
	expr <- bquote(getFromNamespace("print.tmap", "tmap")(.(expr)))
	shiny::renderPlot(expr, env = env, quoted = TRUE, execOnResize = execOnResize)
}

#' @exportS3Method
tmapOutputGS.Grid <- function(x, outputId, width, height, ...) {
	shiny::plotOutput(outputId = outputId, width = width, height = height)
}

#' @exportS3Method
tmapProxyGS.Grid <- function(x, mapId, session, tmobj, ...) {
	message("tmapProxy not working for plot mode (yet)")
	print.tmap(tmobj, show = TRUE)
}

Try the tmap package in your browser

Any scripts or data that you put into this service are public.

tmap documentation built on June 26, 2026, 5:08 p.m.