Quickly and conveniently create interactive visualisations of spatial data with or without background maps. Attributes of displayed features are fully queryable via pop-up windows. Additional functionality includes methods to visualise true- and false-color raster images and bounding boxes.
mapview provides functions to very quickly and conveniently create interactive visualisations of spatial data. It was created to fill the gap of quick (not presentation grade) interactive plotting to examine and visually investigate both aspects of spatial data, the geometries and their attributes.
The main user relevant functions are:
mapview
- view (multiple) spatial objects on a set of background
mapsviewExtent
- view extent / bounding box of spatial objectsviewRGB
- view RGB true- or false-color images of raster objectsmapshot
- easily save maps (including leaflet maps) as html
and/or png
(or other image formats)Functions that have been deprecated/deleted recently:
addHomeButton
- deprecated, use package
leafem insteadaddLogo
- deprecated, use package
leafem insteadaddFeatures
- deprecated, use package
leafem insteadaddMouseCoordinates
- deprecated, use package
leafem insteadaddExtent
- deprecated, use package
leafem insteadaddImageQuery
- deprecated, use package
leafem insteadlatticeView
& sync
- deprecated, use package
leafsync insteadslideView
- deprecated, use package
slideview insteadcubeView
- deprecated, use package
cubeview insteadplainview
- deprecated, use package
plainview insteadpopupTable
, popupGraph
& popupImage
- deprecated, use package
leafpop insteadaddLargeFeatures
- use
leafgl::addGL*
functions
instead - currently not on CRAN!Objects of the following spatial classes are supported:
For CRAN release version of mapview use
install.packages("mapview")
To install the development version install the devtools package.
devtools::install_github("r-spatial/[email protected]")
The most basic call
mapview(breweries)
will produce a web map visualisation of the breweries data with the following components:
Please file bug reports and feature requests at https://github.com/r-spatial/mapview/issues
In case of Pull Requests, please make sure to submit them to the
develop
branch of this repository.
miscellaneous:
bugfixes:
miscellaneous:
new features:
bugfixes:
new features:
bugfixes:
miscellaneous:
new features:
bugfixes:
new features:
method
to specify the method used for resampling of raster data. #123bugfixes:
zcol
was supplied. #124misc:
new features:
enhancements:
bugfixes:
new features:
bugfixes:
new features:
bugfixes:
new features:
addMouseCoordinates has gained argument 'style' to specify whether to show 'basic' (lat, lon, zoom) or 'detailed' (x, y, epsg, proj4, lat, lon, zoom) information. Factory-fresh default is 'detailed'.
addLogo has gained argument 'alpha' to set the opacity of the image.
Someone draws quickest...
added new method for list of objects so that we can do mapview(list(x, y, z)) which is great for computational outputs such as lapply.
slideView has gained arguments 'label1' and 'label2' to supply slider names for the respective images, img1 and img2.
new popup layout (making more use of the space available).
added new function addLargeFeatures to render large datasets of up to ~100k features which is used automatically. To lower/elevate the threshold use maxpoints = ... (See ?mapview for details).
mapview methods for all basic sf classes (XY/sfg, sfc, sf)
added support for sf to "+"
we can now render features/objects with arbitrary CRS (without map background) by setting 'native.crs = TRUE'.
mapview will now decide which default base map to use based on average luminence of rendered colors.
mapview now provides subtle highlighting of polygons (changing opacity slightly) and lines (changing thickness).
plainView, slideView and cubeView have gained argument legend. default is TRUE. Legends only available for non-RGB methods!
new data sets:
data sets 'breweries91', 'gadmCHE' and 'atlStorms2005' have been deleted and moved to leaflet.
bugfixes:
changes:
@object
will be of class sf (regardless of input class).new features:
bugfixes:
new features:
changes:
bugfixes: