[英]Absolute panel in R shiny gets hidden behind the leaflet output
I am trying to make a leaflet map full screen and also add filter controls on top of the map.我正在尝试全屏制作传单地图,并在地图顶部添加过滤器控件。 However, when I try to do this my filter control(absolute panel) gets hidden behind the leaflet output during runtime.
但是,当我尝试这样做时,我的过滤器控件(绝对面板)在运行时隐藏在传单输出后面。
Absolute panel is present when I give width manually当我手动指定宽度时出现绝对面板
I want the map to be full-screen , when I do it, it gets hidden behind the map.我希望地图是全屏的,当我这样做时,它会隐藏在地图后面。
How can I make the map go behind the absolute panel?如何使地图位于绝对面板后面? Any help is appreciated.
任何帮助表示赞赏。
Thanks谢谢
Below is the UI code:下面是界面代码:
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")
)
You can change the z-index
of your panel to make it work.您可以更改面板的
z-index
以使其工作。 Try this:尝试这个:
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")
)
just rewrite it, send it top of absolutePanel 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.