2
내 반짝이는 앱에서 렌더링 할 전단지를 얻을 수는 없지만 코드가 반짝이는 곳 밖에서 작동합니다. 나는 어떤 오류도 발생하지 않아 붙어서 도움이된다.반짝이는/리플렛지도가 렌더링되지 않습니다
샘플 데이터 :
cleanbuffalo <- data.frame(name = c("queen","toni","pepper"),
longitude = c(31.8,32,33),
latitude = c(-24,-25,-26))
반짝 UI :
vars <- c(
"Pepper" = "pepper",
"Queen" = "queen",
"Toni" = "toni"
)
shinyUI(navbarPage("Buffalo Migration", id ="nav",
tabPanel("Interactive Map",
div(class="outer",
leafletOutput("map", width = "100%", height = "100%"),
#Panel Selection
absolutePanel(id = "controls", class = "panel panel-default", fixed = TRUE,
draggable = TRUE, top = 60, left = "auto", right = 20, bottom = "auto",
width = 330, height = "auto",
h2("Buffalo Migration"),
#Buffalo Group selection
checkboxGroupInput(
"checkGroup", label = h3("Select Buffalo to Follow"),
choices = vars,
selected = 1)
)
)
)
)
)
반짝 서버 :
library(shiny)
library(dplyr)
library(leaflet)
library(scales)
library(lattice)
shinyServer(function(input, output, session) {
output$map <- renderLeaflet({
leaflet() %>% addTiles() %>% setView(lng = 31.88, lat = -25.02, zoom=1)
})
내 문제가 해결되었습니다. 감사합니다. 나는이 문제를 결코 짐작하지 않았을 것이다. – josh453
'? shiny :: plotOutput'의 문서는 이유를 설명합니다 : "height"는 HTML/CSS로 높이를 계산하기 때문에 "auto"또는 "100 %"를 사용하면 일반적으로 예상대로 작동하지 않습니다. – SymbolixAU
더하기 github 문제 [여기] (https://github.com/rstudio/shiny/issues/705) [및 여기] (https://github.com/rstudio/shiny/issues/650) 추가 설명을위한 예제 – SymbolixAU