Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

removeMapJunk

Delete elements from a map.


Description

Delete elements from a map.

Usage

removeMapJunk(map, junk = NULL)

Arguments

map

the map from which to remove elements.

junk

a charcter vector of elements to remove. If NULL (the default), nothing is removed and the map is returned as is. See Details for a list of currently supported elements.

Details

Currently supports removal of

  • "zoomControl"

  • "layersControl"

  • "homeButton"

  • "scaleBar"

  • "drawToolbar"

  • "easyButton"

This is mainly useful when taking a static screenshot of a map.

Examples

if (interactive()) {
  library(mapview)

  map = mapview(franconia)

  removeMapJunk(map, "zoomControl")
}

mapview

Interactive Viewing of Spatial Data in R

v2.10.0
GPL (>= 3) | file LICENSE
Authors
Tim Appelhans [cre, aut], Florian Detsch [aut], Christoph Reudenbach [aut], Stefan Woellauer [aut], Spaska Forteva [ctb], Thomas Nauss [ctb], Edzer Pebesma [ctb], Kenton Russell [ctb], Michael Sumner [ctb], Jochen Darley [ctb], Pierre Roudier [ctb], Patrick Schratz [ctb], Environmental Informatics Marburg [ctb], Lorenzo Busetto [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.