Title: | External Interactive Controls for {rdeck} in {rmarkdown} |
---|---|
Description: | HTML widgets for external controls for toggling layers for {rdeck} in HTML documents. |
Authors: | Miles McBain [aut, cre] |
Maintainer: | Miles McBain <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.0 |
Built: | 2024-12-19 05:08:49 UTC |
Source: | https://github.com/qfes/rdeck.controls |
convert rdeckContols to html allowing !important
## S3 method for class 'rdeckControls' as.tags(x, ...)
## S3 method for class 'rdeckControls' as.tags(x, ...)
x |
an rdeckControls widget |
... |
other args passed to htmlwidgets:::toHTML |
html for the widget
Create an external layer control for an rdeck map in rmarkdown or shiny.
rdeck_layer_dropdown( rdeck, layer_names, layer_group_names, initial_selection = NULL, label = "", width = "100%", height = "1em" )
rdeck_layer_dropdown( rdeck, layer_names, layer_group_names, initial_selection = NULL, label = "", width = "100%", height = "1em" )
rdeck |
the target rdeck instance to create a control for. |
layer_names |
a tidy select expression matching layer names. e.g. starts_with("demand") |
layer_group_names |
a tidy select expression matching layer group names. e.g. starts_with("rfs") |
initial_selection |
The layer or layer group that is to be selected by default before the user has interacted with the control. Defaults to the first matched layer name, then layer group name. |
label |
Some text that immediately precedes the dropdown control. |
width |
of the control div as css dimension string. |
height |
of the control div as css dimenson string. |
Match layer_names
and or layer_group_names
by using 'tidy select' syntax see tidyselect::eval_select()
.
The layer_names
tidyselect can only be used to toggle visibility of ungrouped layers, that is layers with no group_name
set. This is enforced by {rdeck}
.
A generic control widget constructor.
rdeckControls( targetRDeckId, controlType = "dropdown", controlData = NULL, width = NULL, height = NULL, elementId = NULL )
rdeckControls( targetRDeckId, controlType = "dropdown", controlData = NULL, width = NULL, height = NULL, elementId = NULL )
Output and render functions for using rdeckControls within Shiny applications and interactive Rmd documents.
rdeckControlsOutput(outputId, width = "100%", height = "1em") renderRdeckControls(expr, env = parent.frame(), quoted = FALSE)
rdeckControlsOutput(outputId, width = "100%", height = "1em") renderRdeckControls(expr, env = parent.frame(), quoted = FALSE)
outputId |
output variable to read from |
width , height
|
Must be a valid CSS unit (like |
expr |
An expression that generates a rdeckControls |
env |
The environment in which to evaluate |
quoted |
Is |