Change WMS parameters such as time, styles or
cql_filter on an existing layer without rebuilding the map.
In Shiny, call this on leafletProxy.
Arguments
- map
a map widget object created from
leaflet()- layerId
the layer id
- group
the name of the group the newly created layers should belong to (for
clearGroup()andaddLayersControl()purposes). Human-friendly group names are permitted–they need not be short, identifier-style names. Any number of layers and even different types of layers (e.g., markers and polygons) can share the same group name.- ...
Named WMS request parameters to set, for example
time = "2022-11-10T21:00:00Z".
See also
Other WMS Functions:
addWMS()
Examples
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")