[英]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.