[英]Absolute panel in R shiny gets hidden behind the leaflet output
我正在尝试全屏制作传单地图,并在地图顶部添加过滤器控件。 但是,当我尝试这样做时,我的过滤器控件(绝对面板)在运行时隐藏在传单输出后面。
我希望地图是全屏的,当我这样做时,它会隐藏在地图后面。
如何使地图位于绝对面板后面? 任何帮助表示赞赏。
谢谢
下面是界面代码:
fluidPage(style="padding-top: 10px;",
h1("Locations"),
absolutePanel(
top = 60, left = "auto", right = 20, bottom = "auto",
width = 330, height = "auto",draggable = TRUE,
wellPanel(
selectInput("Suburb", "Select one Suburb:",choices = c("Select one Suburb" = "All", as.character(mydata$SuburbTown))),
uiOutput("secondselection")
),
style = "opacity: 0.65"
),
leafletOutput("leafl", height = "800px")
)
您可以更改面板的z-index
以使其工作。 尝试这个:
fluidPage(style="padding-top: 10px;",
h1("Locations"),
absolutePanel(
top = 60, left = "auto", right = 20, bottom = "auto",
width = 330, height = "auto",draggable = TRUE,
wellPanel(
selectInput("Suburb", "Select one Suburb:",choices = c("Select one Suburb" = "All", as.character(mydata$SuburbTown))),
uiOutput("secondselection")
),
style = "opacity: 0.65; z-index: 10;" ## z-index modification
),
leafletOutput("leafl", height = "800px")
)
只需重写它,将其发送到 absolutePanel LeafletOutput("leafl", height = "800px") 的顶部
fluidPage(style="padding-top: 10px;",
h1("Locations"),
leafletOutput("leafl", height = "800px"),
absolutePanel(
top = 60, left = "auto", right = 20, bottom = "auto",
width = 330, height = "auto",draggable = TRUE,
wellPanel(
selectInput("Suburb", "Select one Suburb:",choices = c("Select one Suburb" =
"All", as.character(mydata$SuburbTown))),
uiOutput("secondselection")
),`enter code here`
style = "opacity: 0.65"
)
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.