2016-07-19 10:40:40 +00:00
|
|
|
<!DOCTYPE html><html><head>
|
|
|
|
<title>Docker OSM</title>
|
|
|
|
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
|
|
|
|
<style>
|
2016-07-20 05:34:23 +00:00
|
|
|
body {
|
|
|
|
padding: 0;
|
|
|
|
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>
|
2016-07-19 10:40:40 +00:00
|
|
|
<div id="map"></div>
|
2016-07-20 05:34:23 +00:00
|
|
|
<div id="overlay">timestamp</div>
|
2016-07-19 10:40:40 +00:00
|
|
|
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
|
|
|
|
<script>
|
2016-07-20 05:34:23 +00:00
|
|
|
var timestamp;
|
|
|
|
xmlhttp=new XMLHttpRequest();
|
|
|
|
xmlhttp.onreadystatechange=function() {
|
|
|
|
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
|
|
|
timestamp = xmlhttp.responseText;
|
|
|
|
}
|
|
|
|
}
|
2018-03-09 09:01:05 +00:00
|
|
|
xmlhttp.open("GET", "settings/timestamp.txt", false );
|
2016-07-20 05:34:23 +00:00
|
|
|
xmlhttp.send();
|
|
|
|
document.getElementById('overlay').innerHTML = timestamp;
|
|
|
|
|
2016-07-19 10:40:40 +00:00
|
|
|
var map = L.map('map').setView([0, 0], 3);
|
2016-07-20 02:21:46 +00:00
|
|
|
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png?').addTo(map);
|
|
|
|
|
2018-03-09 09:01:05 +00:00
|
|
|
var wms = L.tileLayer.wms("http://localhost:8198/", {
|
|
|
|
layers: 'osm_buildings20160720014515980',
|
2016-07-19 10:40:40 +00:00
|
|
|
format: 'image/png',
|
|
|
|
transparent: true,
|
|
|
|
attribution: "OpenStreetMap"
|
2016-07-20 02:21:46 +00:00
|
|
|
}).addTo(map);
|
|
|
|
|
2016-07-19 17:24:46 +00:00
|
|
|
var overlays = {
|
2016-07-20 02:21:46 +00:00
|
|
|
"OSM-Docker": wms,
|
|
|
|
"OSM-Tiles": osm
|
2016-07-19 10:40:40 +00:00
|
|
|
};
|
2016-07-20 02:21:46 +00:00
|
|
|
L.control.layers({}, overlays).addTo(map);
|
2016-07-19 17:24:46 +00:00
|
|
|
</script></body></html>
|