-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathleaflet4.html
43 lines (43 loc) · 1.37 KB
/
leaflet4.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>
<title>Mallow</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
</head>
<body>
<div id="map" style="height:400px;width:300px"></div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
//make a base layer
var baseLayer = L.tileLayer.wms('https://layers.nbnatlas.org/geoserver/ALA/wms', {
layers: 'ALA:county_coastal_terrestrial_region',//'ALA:world',
styles: 'ALA:borders_only',
format: 'image/png',
maxZoom: 14,
minZoom: 0,
continuousWorld: true,
attribution: 'NBN Atlas'
})
//make an occurrence layer for Mallow
var mallow = L.tileLayer.wms(
"https://records-ws.nbnatlas.org/ogc/wms/reflect", {
q : "lsid:NHMSYS0000460576",
layers: 'ALA:occurrences',
format: 'image/png',
transparent: true,
attribution: "NBN Atlas",
bgcolor:"0x000000",
ENV: "colormode:year,1000,1999,2000,2009,2010,2017;opacity:1.0"
});
//make a map and add the layers
var map = L.map('map', {
center: [56.6,-4.0],
zoom: 6,
layers: [baseLayer, mallow]
});
</script>
</body>
</html>