REmap
REmap copied to clipboard
shinydashboard中如何展示REmap?DT::dataTableOutput一起用显示空白?
你好,请问:
UI: tabItems( tabItem(tabName = "wifi_01_company", tabsetPanel(type = "tabs", #height = "100%", width = "100%", tabPanel("行为轨迹", icon = icon("tag"), #REmapOutput("track_train"), hr(), #DT::dataTableOutput('tab_hot_train'), hr() ),
Server: output$track_train <- renderREmap( remapB( center = BJU, zoom = 9, color = "grassgreen", markLineData = markLine_data, markPointData = markPointData, markLineTheme = markLine_Control, markPointTheme = markPointTheme, geoData = gdata )) 在上述代码中无法显示地图,且影响界面的其它组件使用,请问如何解决呢?
代码在如下情况下能够正常展示地图: body <- dashboardBody( tabsetPanel(type = "tabs", tabPanel("行为轨迹",icon = icon("tag"), REmapOutput("track_train"), hr() #DT::dataTableOutput('tab_hot_train') )))
能给段可执行代码么? 后面说的那个应该是正常情况
代码:https://github.com/maliang1202/Learn/blob/master/shinydashboard
@Lchiffon 请专家帮忙看看,谢谢。
和这个 https://github.com/rstudio/shinydashboard/issues/251 类似?
好像是一些和shinydashboard的冲突
明白了 Echarts.js和adminLTE.js都会使用$来作为一个调用的接口, 产生了冲突, 在JS层面产生了冲突, 所以不能同时使用
除了把它用htmlwidgets重写掉之外, 我想不出有什么解决的方法...
@Lchiffon 非常感谢 :+1:
echarts4r
被RStudio幕后工作人员修改人为篡改,导致在rmarkdown无法正常显示~
明白了 Echarts.js和adminLTE.js都会使用$来作为一个调用的接口, 产生了冲突, 在JS层面产生了冲突, 所以不能同时使用 除了把它用htmlwidgets重写掉之外, 我想不出有什么解决的方法...
这个
REmap
也一样,可否瞧瞧?怎么修正htmlwidgets
呢?
(1) 提示信息~
prefer_conflicts('xxx$xxx', 'Echarts.js')
prefer_conflicts('xxx$xxx', 'adminLTE.js')
或者 (2)在htmlwidgets
程序包函数中添加条件式调用~
if(xxx == 'echarts.js') {
xxxxx
} else if(xxx == 'adminLTE.js') {
xxxxx
}
https://user-images.githubusercontent.com/7227582/161288371-000ca42c-818d-4e00-9f77-e3186a0f1459.mp4
shinyWidgets::prettyRadioButtons
也一样...
相关文章:
- https://github.com/scibrokes/owner/issues/2#issuecomment-1085962755
- error : shinyWidgets and plot graph
- https://github.com/maliang1202/Learn/issues/1#issue-306723973
- https://github.com/rstudio/shinydashboard/issues/251#issue-277363672
- https://github.com/Lchiffon/REmap/issues/21#issuecomment-349564477
明白了 Echarts.js和adminLTE.js都会使用$来作为一个调用的接口, 产生了冲突, 在JS层面产生了冲突, 所以不能同时使用
除了把它用htmlwidgets重写掉之外, 我想不出有什么解决的方法...
如果是需要地图,可以通过MapBox 或 SimpleMaps 或 OpenStreetMap 下载,不过韦经度得修改~
You can use the
map_data
function from the{ggplot2}
package to pull data for maps at different levels(“usa,” “state,” “world,” “county”)
. The data you pull give locations of the borders of geographic polygons like states and counties. For example, you can get the polygon location data for U.S. states by running the following code
引用:Mastering Software Development in R - 4.3 Mapping
map_data
有许多地方的地方名称信息不完整,需要标签地点名称~
maps
程序包或者Adding Data Points to world map in R有完整的数据~