forked from ghettovoice/ol-tilecache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
40 lines (38 loc) · 1.06 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test example</title>
<link rel="stylesheet" href="node_modules/openlayers/dist/ol.css">
<style>
html, body, #map {
width : 100%;
height : 100%;
margin : 0;
padding : 0;
}
</style>
</head>
<body>
<div id="map"></div>
<script src="node_modules/openlayers/dist/ol.js"></script>
<script src="dist/bundle.js"></script>
<script>
const map = new ol.Map({
target: 'map',
view: new ol.View({
projection: 'EPSG:3857',
center: [4189972.14, 7507950.67],
zoom: 5
}),
layers: [
new ol.layer.Tile({
source: new ol.source.XYZ({
tileUrlFunction: ol.TileCacheUrlFunction.createTileUrlFunction('http://{a-z}.tiles.org/{0z}/{x1}/{x2}/{x3}/{-y1}/{-y2}/{-y3}.png')
})
})
]
});
</script>
</body>
</html>