Starts the spinner, waits until the browser has painted it (and Shiny
has flushed that update), then evaluates expr and always stops
the spinner.
Usage
spinWhile(
mapId,
expr,
options = NULL,
session = shiny::getDefaultReactiveDomain()
)Arguments
- mapId
The
outputIdof theleafletOutput.- expr
Expression to evaluate after the spinner is shown.
- options
Passed to
startSpinner.- session
The Shiny session; default is the current domain.
See also
Other Spinner Functions:
addSpinner()
Examples
if (FALSE) { # \dontrun{
observeEvent(input$go, {
spinWhile("leaf", {
Sys.sleep(2)
leafletProxy("leaf") %>% addMarkers(data = quakes, ~long, ~lat)
})
})
} # }