我正在尝试全屏制作传单 map ,并在 map 顶部添加过滤器控件。但是,当我尝试这样做时,我的过滤器控件(绝对面板)在运行时隐藏在传单输出后面。
Absolute panel is present when I give width manually
我希望 map 是全屏的,当我这样做时,it gets hidden behind the map.
如何使 map 位于绝对面板后面? 感谢您的帮助。
谢谢
界面代码如下:
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")
)
关于javascript - R shiny 中的绝对面板隐藏在传单输出后面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50110488/