使用HTML ui上的传单使用传单

时间:2015-09-24 08:04:25

标签: html r shiny leaflet

我正在尝试使用HTML界面在一个闪亮的应用上绘制带有传单的动态地图但是当我得到地图时它是静态的 当使用只有R接口的简单方法时,它工作得很好 有没有办法使用index.html动态显示地图而不是ui.r?

这就是我想要只使用R接口的方法

app <- shinyApp(
ui <- fluidPage(leafletOutput('myMap')),
server <- function(input, output) {
    map <- your.map
    output$myMap <- renderLeaflet(map)
}
)
 print(app)

这是我的“index.html”文件:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="application/shiny-singletons"></script>
<script type="application/html-dependencies">json2[2014.02.04];jquery[1.11.1];shiny[0.12.2];htmlwidgets[0.5];leaflet[0.7.3];leafletfix[1.0.0];leaflet-label[0.2.2];leaflet-binding[1.0.1.9000];bootstrap[3.3.1]</script>
<script src="shared/json2-min.js"></script>
<script src="jquery-1.11.1/jquery.min.js"></script>
<link href="shared/shiny.css" rel="stylesheet" />
<script src="shared/shiny.min.js"></script>
<script src="htmlwidgets-0.5/htmlwidgets.js"></script>
<link href="leaflet-0.7.3/leaflet.css" rel="stylesheet" />
<script src="leaflet-0.7.3/leaflet.js"></script>
<link href="leafletfix-1.0.0/leafletfix.css" rel="stylesheet" />
<link href="leaflet-label-0.2.2/leaflet.label.css" rel="stylesheet" />
<script src="leaflet-label-0.2.2/leaflet.label.js"></script>
<script src="leaflet-binding-1.0.1.9000/leaflet.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="shared/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<script src="shared/bootstrap/js/bootstrap.min.js"></script>
<script src="shared/bootstrap/shim/html5shiv.min.js"></script>
<script src="shared/bootstrap/shim/respond.min.js"></script>

</head>
<body>
<div class="container-fluid">
<div id="myMap" style="width:100%; height:400px" class="leaflet html-widget html-widget-output"></div>
</div>
</body>
</html>

1 个答案:

答案 0 :(得分:-1)

好的,我把它解决了 应该使我的服务器功能被动