How to get Leaflet for R use 100% of Shiny dashboard height

后端 未结 6 626
伪装坚强ぢ
伪装坚强ぢ 2020-12-13 01:44

I am in the process of creating a Shiny dashboard application, where the dashboard body is supposed to show some maps. So far no problem to get the map expand over the entir

6条回答
  •  萌比男神i
    2020-12-13 02:25

    You can also do it if you want to combine your leaflet map with another kind of panel structures like a navBarPage, including the map in a tabPanel:

    tags$style(type = "text/css", "html, body {width:100%;height:100%}"), tags$style(type = "text/css", "#map {height: calc(100vh - 80px) !important;}"), leafletOutput("map", width = "100%", height = "100%"),

提交回复
热议问题