0
반짝 이는 응용 프로그램에서 전단지를 가지고 있습니다. 그것은 사용자로부터 파일을 가져 와서 그 데이터를 표시합니다. 그래도 지금은보기 흉하게 보입니다. fileInput을 리플렛 맵에 중첩되도록하고 싶습니다. 즉, 페이지를 전체적으로 리플릿 맵으로 만들려고하지만 위의 파일 입력은 줌 버튼과 비슷합니다.r - 반짝 반짝 빛나는 전단지에 오버레이 파일 입력
파일 인풋 업로드 버튼을 this shiny app과 같은 종류로 보이게하고 싶습니다. 왼쪽 상단에 겹쳐진 로고와 왼쪽에 중첩 된 확인란 및 오른쪽 상단에 중첩 된 제목이 있습니다.
library(shiny)
library(shinydashboard)
library(leaflet)
shinyApp(
ui <- bootstrapPage(
fileInput("file_in", label = "label"),
tags$style(type="text/css", "html, body {width:100%;height:100%}"),
leafletOutput("myMap", width="100%", height="100%")
),
server = function(input, output) {
my_table <- reactive({
inFile <- input$file_in
if (is.null(inFile))
return(NULL)
myData = read.csv(inFile$datapath)
return(myData)
})
output$myMap = renderLeaflet({
if(is.null(my_table()))
{
return(leaflet()) %>% addTiles()
}
else
{
leaflet(data = my_table()) %>% addTiles()
}
})
}
)