Reputation: 1
A map (shape.shp) was created using ggplot and converted into a ggplotly format. The data is based on an environment with SharedData (crosstalk) to create an interactive linkage with the corresponding data table.
The problem is that the map does not automatically adapt to the new plot container size when the window size is changed in the Shiny app.
To reduce the map's loading time, it was converted into an HTML format. However, the problem persists both in the original ggplot format and in the HTML (iframe) version. I have tried countless variations (via tags$script) and would greatly appreciate any helpful comments.
Here my code in the ui:
column(width=9, id="maps",
tabBox(width = 12,
tabPanel(id = "tab-map", HTML(paste("MAP_1", sep = "<br/>")),
column(width=12, tags$iframe(id="plotFrame_map_1", style = "width:100%;
height=100%; border:none;", src = "plot_1.html"))),
tabPanel(HTML(paste("MAP_2", sep = "<br/>")),
column(width=12, tags$iframe(id="plotFrame_map_2", style = "width:100%;
height=100%; border:none;", src = "plot_2.html")))
))
),
Please let me know if you need more input. Thanks in advance for any helpful hints.
Upvotes: 0
Views: 27