r-spatial / rgee

Google Earth Engine for R
https://r-spatial.github.io/rgee/
Other
677 stars 146 forks source link

feature request - transparency slider for layers in map after calling `Map$addLayer()` #266

Closed zackarno closed 2 years ago

zackarno commented 2 years ago

Would it be feasible/possible to add a transparency slider for the layers added to the map with Map$addLayer() ? There is currently a checkbox which is nice, but I think an additional transparency slider (as there is in GEE javascript code editor) would be a welcome feature.

csaybar commented 2 years ago

I think this feature already exist in Map$addLayer

library(rgee)

ee_Initialize()

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"
)

m5 <- Map$addLayer(
  eeObject = image,
  visParams = list(
    bands = c("B4", "B3", "B2"),
    max = 10000
  ),
  name = "SF",
  opacity = 0.2
)

m4 | m5

image

amrit-thapa-2044 commented 1 year ago

@csaybar, I would like to add text (for eq: Image acquired date) somewhere on both sides. Is it possible?