0

I have a R Shiny app which includes a map. The basemap is rendered using the R Googleway package, whilst the data layers are added using mapdeck. The rendering of a large number of x/y points using the add_scatterplot function is extremely fast in my local environment. A lot faster than what is possible using R leaflet. However, when I deploy the app to a Posit Connect server, the rendering suffers, probably due to an under powered graphics card on the server.

I would like to add a "busy spinner" to the map, so that a spinner is visible once the rendering of the add_scatterplot started.

In the Shiny UI, I have included a withSpinner from the shinycssloaders package - an extract from the Shiny UI is shown below.

withSpinner(
                google_mapOutput(
                  NS(id, "ageAnalysisMap"),
                  height = as.character(mapheight)
                ),
                type = 4,
                color = config$notifyColour,
                size = 0.5
              )

However, the spinner only shows whilst the Shiny server function is busy with processing. Once rendering of the map itself starts, the spinner disappears.

Does anyone have advice on which function could be used to add a spinner whilst rendering starts?

Jaco
  • 31
  • 4
  • 1
    I think it's best to share your whole code or simplified code with the ui and server,so people could help. – Golem Aug 06 '23 at 18:53

0 Answers0