Learn R Programming

rgee (version 0.2.0)

+,mapview,mapview-method: mapview + mapview; adds data from the second map to the first

Description

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

Usage

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

Arguments

e1

a mapview map to which e2 should be added.

e2

a mapview map from which the objects should be added to e1.

Examples

Run this code
# NOT RUN {
eeobject <- ee$FeatureCollection("users/csaybar/DLdemos/train_set")
center <- eeobject$geometry()$centroid()$getInfo()$coordinates
vizparams <- list(color = "FF0000", strokeWidth = 5)
m1 <- ee_map(eeobject, vizparams, center, objname = "Arequipa-landuse")

collection <- ee$ImageCollection("LANDSAT/LC08/C01/T1_TOA")$
  filter(ee$Filter()$eq("WRS_PATH", 44))$
  filter(ee$Filter()$eq("WRS_ROW", 34))$
  filterDate("2014-01-01", "2015-01-01")$
  sort("CLOUD_COVER")
eeobject <- collection$median()
vizparams <- list(bands = c("B4", "B3", "B2"), max = 0.3)
center <- c(-122.3578, 37.7726)
m2 <- ee_map(eeobject, vizparams, center, objname = "SF")
m1 + m2
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab