kopia lustrzana https://github.com/kartoza/docker-osm
add timestamp to the webpage
rodzic
81d5eb4c02
commit
494f9ef1a9
|
@ -98,6 +98,7 @@ qgisserver:
|
||||||
volumes:
|
volumes:
|
||||||
- ./logs:/var/log/apache2
|
- ./logs:/var/log/apache2
|
||||||
- ./web:/web
|
- ./web:/web
|
||||||
|
- ./settings:/web/settings
|
||||||
links:
|
links:
|
||||||
- db:db
|
- db:db
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -2,12 +2,43 @@
|
||||||
<title>Docker OSM</title>
|
<title>Docker OSM</title>
|
||||||
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
|
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
|
||||||
<style>
|
<style>
|
||||||
body { padding: 0; margin: 0;}
|
body {
|
||||||
html, body, #map { height: 100%; width: 100%; background-color: #2b6adb;}
|
padding: 0;
|
||||||
</style></head><body>
|
margin: 0;
|
||||||
|
}
|
||||||
|
html, body, #map {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #2b6adb;
|
||||||
|
}
|
||||||
|
#overlay{
|
||||||
|
position:absolute;
|
||||||
|
top:10px;
|
||||||
|
left:50px;
|
||||||
|
background-color:rgba(255, 255, 255, 0.7);
|
||||||
|
padding: 5px;
|
||||||
|
border: 1px solid;
|
||||||
|
border-radius: 2px;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
|
<div id="overlay">timestamp</div>
|
||||||
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
|
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
var timestamp;
|
||||||
|
xmlhttp=new XMLHttpRequest();
|
||||||
|
xmlhttp.onreadystatechange=function() {
|
||||||
|
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
||||||
|
timestamp = xmlhttp.responseText;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
xmlhttp.open("GET", "/settings/timestamp.txt", false );
|
||||||
|
xmlhttp.send();
|
||||||
|
document.getElementById('overlay').innerHTML = timestamp;
|
||||||
|
|
||||||
var map = L.map('map').setView([0, 0], 3);
|
var map = L.map('map').setView([0, 0], 3);
|
||||||
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png?').addTo(map);
|
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png?').addTo(map);
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue