Description Usage Arguments Author(s) Examples
mapview + mapview; adds data from the second map to the first
1 2 | ## S4 method for signature 'mapview,mapview'
e1 + e2
|
e1 |
a mapview map to which e2 should be added. |
e2 |
a mapview map from which the objects should be added to e1. |
Adapted from tim-salabim code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | ## Not run:
library(rgee)
ee_reattach() # reattach ee as a reserved word
ee_Initialize()
# Case 1: Geometry*
geom <- ee$Geometry$Point(list(-73.53, -15.75))
Map$centerObject(geom, zoom = 13)
m1 <- Map$addLayer(
eeObject = geom,
visParams = list(
pointRadius = 10,
color = "FF0000"
),
name = "Geometry-Arequipa"
)
# Case 2: Feature
eeobject_fc <- ee$FeatureCollection("users/csaybar/DLdemos/train_set")$
first()
m2 <- Map$addLayer(
eeObject = ee$Feature(eeobject_fc),
name = "Feature-Arequipa"
)
m2 + m1
# Case 3: FeatureCollection
eeobject_fc <- ee$FeatureCollection("users/csaybar/DLdemos/train_set")
Map$centerObject(eeobject_fc)
m3 <- Map$addLayer(eeObject = eeobject_fc, name = "FeatureCollection")
m3 + m2 + m1
# Case 4: Image
image <- ee$Image("LANDSAT/LC08/C01/T1/LC08_044034_20140318")
Map$centerObject(image)
m4 <- Map$addLayer(
eeObject = image,
visParams = list(
bands = c("B4", "B3", "B2"),
max = 10000
),
name = "SF"
)
m4
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.