-
Notifications
You must be signed in to change notification settings - Fork 2
/
08_WMS.html
41 lines (39 loc) · 850 Bytes
/
08_WMS.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
<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" href="css/ol.css" type="text/css"/>
<link rel="stylesheet" href="css/sample.css" type="text/css"/>
<style>
body {
padding : 0;
margin : 0;
}
</style>
<title>OpenLayers 3 example 08 WMS</title>
</head>
<body>
<div id="map" class="map"></div>
<script src="js/ol-debug.js"></script>
<script type="text/javascript">
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source : new ol.source.TileWMS({
url : 'https://hondou.homedns.org/mapserver/mapcache?',
params: {
// these are simply added to http-get parameter
'LAYERS' : 'test',
'TRANSPARENT' : 'FALSE'
}
})
})
],
view: new ol.View({
center: ol.proj.transform([39.816667, 21.416667], 'EPSG:4326', 'EPSG:3857'),
zoom: 4
})
});
</script>
</body>
</html>