-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_openlayers.html
61 lines (54 loc) · 1.69 KB
/
test_openlayers.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html>
<head>
<title>Quick Test GTS with OpenLayers</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://openlayers.org/en/v4.6.4/css/ol.css" type="text/css">
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
<script src="https://openlayers.org/en/v4.6.4/build/ol.js"></script>
<style>
#map {
width: 600px;
height: 350px;
}
</style>
</head>
<body>
<header>
<center>
<h1>Venice!</h1>
</center>
</header>
<center>
<div id="map" class="map"></div>
</center>
<script>
var mAttr = 'Modified <a href="https://scihub.copernicus.eu/">Copernicus</a>' +
' Sentinel data 2016 by ' +
'<a href="https://www.sentinelmap.eu">SentinelMap</a>';
var mUrl = 'http://localhost:8000/{z}/{x}/{y}.jpg?key=';
var pkey = 'TEST'; //This can come from other sources, like props, etc...
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.XYZ({
attributions: mAttr,
url: mUrl + pkey
})
})
],
view: new ol.View({
center: ol.proj.fromLonLat([12.3450, 45.4350]),
zoom: 13
})
});
</script>
<footer>
<center>
<h3>...with OpenLayers it works too!</h3>
</center>
</footer>
</body>
</html>