-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprovinces1.html
43 lines (41 loc) · 1.17 KB
/
provinces1.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
<!doctype html>
<html >
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/css/ol.css" type="text/css">
<script src="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/build/ol.js"></script>
<title>OpenLayers </title>
<style>
.map {
height: 500px;
width: 100%;
}
</style>
</head>
<body>
<div id="map" ></div>
<script >
var map = new ol.Map({
view: new ol.View({
projection : 'EPSG:4326' ,
center: [-7.589843400000063, 33.5731104],
zoom: 8
}),
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
],
target: 'map'
});
var provinces=new ol.layer.Image({
source:new ol.source.ImageWMS({
url :'http://localhost:8080/geoserver/provinces/wms?service=WMS',
params : {'LAYERS':'provinces:provinces'} ,
serverType:'geoserver'
})
});
provinces.setOpacity(0.3);
map.addLayer (provinces);
</script>
</body>
</html>