-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathregionalPresentation1.html
56 lines (55 loc) · 2.27 KB
/
regionalPresentation1.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
<!DOCTYPE html>
<html>
<head>
<title>Sample WMS Leaflet JS</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="https://d19vzq90twjlae.cloudfront.net/leaflet-0.7/leaflet.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.4/leaflet.draw.css" />
<style>
#map {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px
}
</style>
<script src="/js/leaflet-0.7.2/leaflet.ajax.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
<div id="map">
</div>
<script src="https://d19vzq90twjlae.cloudfront.net/leaflet-0.7/leaflet.js">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.4/leaflet.draw.js">
</script>
<script type="text/javascript">
var map = L.map('map').setView([54.7824, -127.1686], 13);
L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community',
maxZoom: 20,
minZoom: 0
}).addTo(map);
// Create & add WMS-layer.
var tsa = new L.TileLayer.WMS('https://openmaps.gov.bc.ca/geo/pub/WHSE_FOREST_TENURE.FTEN_HARVEST_AUTH_POLY_SVW/ows?service=WMS&request=GetCapabilities', {
layers: 'pub:WHSE_FOREST_TENURE.FTEN_HARVEST_AUTH_POLY_SVW',
format: 'image/png',
transparent: true
});
tsa.addTo(map);
// Perform 'GetCapabilities' request.
tsa.getCapabilities({
done: function (capabilities) {
console.log('getCapabilitiessucceed: ', capabilities);
},
fail: function (errorThrown) {
console.log('getCapabilitiesfailed: ', errorThrown);
},
always: function () {
console.log('getCapabilitiesfinished');
}
});
</script>
</body>
</html>