R/widget_mapManager_server.R
updateMapManagerLayer.Rd
Change the layer for a map manager widget on the client.
updateMapManagerLayer(
session = shiny::getDefaultReactiveDomain(),
inputId,
value
)
session | The |
---|---|
inputId |
|
value |
|
The argument to value
should be list
object containing
the information necessary to update a layer.
Broadly speaking, it should contain the following elements:
character
value with the identifier for the layer.
character
value with the name of the setting to update.
ANY
new value for the setting.
Note that the value
element in the list
object should have a
class (i.e. numeric
, logical
) that is relevant
to the setting that should be updated. For example, if the
setting
element is equal to name
, then the value
element
should contain a character
value.
For reference, we provide examples detailing all the various settings that
can be updated below.
Update layer name. This controls the bold text shown in the header of the layer.
"LAYERID"
"name"
"SPECIES"
Update layer visibility.
This controls the visible checkbox for a layer.
Note that the value
element must be a logical
(TRUE
or FALSE
) value
"LAYERID"
"visible"
TRUE
Update the visibility of features within a layer.
This controls the visible checkbox for each feature within a theme.
Note that the value
element must have a value for each feature
within the theme (the example below assumes the theme has three features).
"LAYERID"
"feature_visible"
c(TRUE, FALSE, TRUE)
Update the order of features within a layer.
This controls the relative order of the features within a theme.
Note that the value
element must have a value for each dataset
within a layer (e.g. the example below assumes a theme has three features).
"LAYERID"
"feature_order"
c(TRUE, FALSE, TRUE)