powered by
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, ...)
addExtent(map, data, ...)
either a Raster*, sf* or Spatial* object
a leaflet map the extent should be added to. If NULL standard background layers are created.
a list of HTML strings with the popup contents, usually created from popupTable. See addControl for details.
list
popupTable
addControl
the name of the layer to be shown on the map.
opacity of the fills or the raster layer(s).
a character vector of labels to be shown on mouseover. See addControl for details.
additional arguments passed on to addRectangles
addRectangles
addExtent: add extent/bbox of spatial/sf objects to a leaflet map
addExtent
# NOT RUN { library(leaflet) viewExtent(breweries) viewExtent(franconia) + breweries leaflet() %>% addProviderTiles("OpenStreetMap") %>% addExtent(breweries) # }
Run the code above in your browser using DataLab