Learn R Programming

mapview (version 1.1.0)

viewExtent: View extent/bbox of spatial objects interactively

Description

This function produces an interactive view of the extent/bbox of the supplied spatial object

Usage

viewExtent(x, map = NULL, map.types = mapviewGetOption("basemaps"), popup = NULL, ...)
addExtent(x, map, popup, ...)

Arguments

x
either a Raster* object or a Spatial* object
map
a leaflet map the extent should be added to. If NULL standard background layers are cretaed
map.types
the map types to be used in case map is NULL
popup
a character vector of the HTML content for the popups. See addControl for details.
...
additional arguments passed on to addRectangles

Functions

  • addExtent: add extent/bbox of spatial objects interactively

Examples

Run this code
## Not run: 
# ### raster data ###
# library(sp)
# library(raster)
# 
# data(meuse.grid)
# coordinates(meuse.grid) = ~x+y
# proj4string(meuse.grid) <- CRS("+init=epsg:28992")
# gridded(meuse.grid) = TRUE
# 
# viewExtent(meuse.grid)
# ## End(Not run)

Run the code above in your browser using DataLab