Learn R Programming

mapview (version 2.2.0)

+: mapview + mapview adds data from the second map to the first

Description

mapview + mapview adds data from the second map to the first

mapview + data adds spatial data (raster*, sf*, sp*) to a mapview map

[...]

Usage

# S4 method for mapview,mapview
+(e1, e2)

# S4 method for mapview,ANY +(e1, e2)

# S4 method for mapview,character +(e1, e2)

Arguments

e1

a leaflet or mapview map to which e2 should be added.

e2

a (spatial) object to be added or a mapview object from which the objects should be added to e1.

Examples

Run this code
# NOT RUN {
### raster data ###
library(sp)
library(raster)

m1 <- mapView(poppendorf[[5]])

### point vector data ###
m2 <- mapView(breweries91)

### add two mapview objects
m1 + m2
'+'(m2, m1)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab