这个问题不知能不在该板题问@@
[环境架设/问题简叙]
我在实体机上ubuntu上架设了shiny server
测试用的shiny范例程式所放路径:
$cd /opt/shiny-server/samples/sample-apps
并放了几个范例程式,如下
http://140.128.197.58:3838/sample-apps/
(问题所在!!!!)但在尝试leaflet地图套件时出错:
http://140.128.197.58:3838/sample-apps/leaflet1/
不过leaflet应用在js上就可以了@_@
http://140.128.197.58:3838/sample-apps/html-samples/leaflet.html
这是用rshiny抓取服务器上mysql的资料
http://140.128.197.58:3838/sample-apps/rmysql2/
[目的]
所以我想用js写好的leaflet套件用php连接rshiny
或直接用php连sql也可
[程式码]
以下是js呈现leaflet的code
http://140.128.197.58:3838/sample-apps/html-samples/leaflet.html
<html>
<head>
<title>A Leaflet map!</title>
<link rel="stylesheet"
href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"/>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<style>
#map{ height: 100% }
</style>
</head>
<body>
<div id="map"></div>
<script>
// initialize the map
var map = L.map('map').setView([24.179,120.601], 16);
// load a tile layer
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a>
contributors'
}).addTo(map);
L.marker([24.179,120.601]).addTo(map)
.bindPopup('A pretty CSS3 popup.<br> Easily customizable.')
.openPopup();
</script>
</body>
</html>
[环境版本]
ubuntu 14.04.05
shiny-server 1.5.1
R 3.3.2
leaflet 1.0.1
请问可能行吗??
php初学者让如何入门??