viewExtent {mapview} | R Documentation |
This function produces an interactive view of the extent/bbox of the supplied spatial object
viewExtent( x, map = NULL, popup = NULL, layer.name = NULL, alpha.regions = 0.2, label = NULL, ... ) addExtent(map, data, ...)
x |
either a Raster*, sf* or Spatial* object |
map |
a leaflet or mapview map the extent should be added to. If NULL standard background layers are created. |
popup |
a |
layer.name |
the name of the layer to be shown on the map. |
alpha.regions |
opacity of the fills or the raster layer(s). |
label |
a character vector of labels to be shown on mouseover. See
|
... |
additional arguments passed on to |
data |
either a Raster*, sf* or Spatial* object |
addExtent
: add extent/bbox of spatial/sf objects to a leaflet map -
This function is deprecated.
Please use leafem::addExtent
instead.
Tim Appelhans
library(leaflet) viewExtent(breweries) viewExtent(franconia) + breweries mapview(franconia) %>% leafem::addExtent(franconia, fillColor = "yellow") leaflet() %>% addProviderTiles("OpenStreetMap") %>% leafem::addExtent(breweries) leaflet() %>% addProviderTiles("OpenStreetMap") %>% leafem::addExtent(breweries)