| setWMSParams | R Documentation |
Change WMS parameters such as time, styles or
cql_filter on an existing layer without rebuilding the map.
In Shiny, call this on leafletProxy.
setWMSParams(map, layerId = NULL, group = NULL, ...)
map |
a map widget object created from |
layerId |
the layer id |
group |
the name of the group the newly created layers should belong to
(for |
... |
Named WMS request parameters to set, for example
|
the new map object
Other WMS Functions:
addWMS()
library(leaflet)
library(leaflet.extras2)
leaflet() %>%
addTiles() %>%
addWMS(
baseUrl = "https://gibs.earthdata.nasa.gov/wms/epsg3857/best/wms.cgi",
layers = "MODIS_Terra_CorrectedReflectance_TrueColor",
layerId = "modis",
options = WMSTileOptions(format = "image/jpeg", time = "2022-11-10")
) %>%
setWMSParams(layerId = "modis", time = "2022-11-11")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.