| spinWhile | R Documentation |
Starts the spinner, waits until the browser has painted it (and Shiny
has flushed that update), then evaluates expr and always stops
the spinner.
spinWhile(
mapId,
expr,
options = NULL,
session = shiny::getDefaultReactiveDomain()
)
mapId |
The |
expr |
Expression to evaluate after the spinner is shown. |
options |
Passed to |
session |
The Shiny session; default is the current domain. |
The Shiny session (invisible).
Other Spinner Functions:
addSpinner()
## Not run:
observeEvent(input$go, {
spinWhile("leaf", {
Sys.sleep(2)
leafletProxy("leaf") %>% addMarkers(data = quakes, ~long, ~lat)
})
})
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.