Learn R Programming

mapview (version 1.1.0)

+: Add a layer to a mapview or leaflet map

Description

Add a layer to a mapview or leaflet map

Usage

"+"(e1, e2)
"+"(e1, e2)

Arguments

e1
the map to which the layer should be added
e2
(spatial) object to be added

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 # final zoom level based on m2
# '+'(m2, m1) # final zoom level based on m1
# ## End(Not run)

Run the code above in your browser using DataLab