1
前述のように、私は光沢のあるダッシュボードを使用しています。ズームインするとリーフレットの地図がレンダリングされません。コードは次のとおりです。それは与えられた緯度にマーカーをプロットしています。ズームインすると、ズームインされません。静的であるように見え、ズームインするとレンダリングが行われません。できるだけ早くヘルプが必要です。シャイニーのリーフレットマップはズームイン時にレンダリングされません。静止しています
server.R
mapPlot <- function(searchTerm, maxTweets, lang, lat, long, rad){
mapTweets <- searchTwitter(searchString = searchTerm, n = maxTweets, lang = "en", geocode = paste(lat,long,paste0(rad, "mi"),sep=","))
mapTweets.df <- twListToDF(mapTweets)
return(mapTweets.df)
}
entity13 <- eventReactive(input$mapit,{
progress <- shiny::Progress$new(session, min=1, max=15)
on.exit(progress$close())
progress$set(message = 'Rendering the leaflet map to visualize')
for (i in 1:15) {
progress$set(value = i)
Sys.sleep(0.5)
}
print("Calling..")
entity13 <- mapPlot(input$k, input$n, lang = "en", input$lat, input$long, input$rad)
entity13
})
output$mymap <- renderLeaflet({
m <- leaflet(entity13()) %>% addTiles() %>%
addMarkers(entity13()$longitude, entity13()$latitude, popup = entity13()$screenName)
m %>% setView(entity13()$longitude, entity13()$latitude, zoom = 4)
m
})
ui.R (重要であるコードだけ抜粋)
column(width = 9,
box(width = NULL, solidHeader = TRUE,
leafletOutput("mymap", height = 500)
))
私に教えるあなたの努力は素晴らしかったです。私は1つの貴重な教訓を学びました。ありがとうございました! –
Twitterの検索APIがNAのあるつぶやきを返すことはわかっていました。しかし、返された結果からNAを取り除かなければならないということはありませんでした。あなたのタイムリーな助けに感謝し、私はコードを再現可能な方法で投稿するように助言します! –
@SolomonAathiRaj - あなたも大歓迎です。私が手伝ってくれてうれしいです。 – SymbolixAU