forked from DuncanRowland/NBNMapOverlayExamples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
leaflet1.html
40 lines (40 loc) · 1.4 KB
/
leaflet1.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>
<head>
<title>Red fox</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 minimal = L.tileLayer(
"http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png", {
styleId: 22677,
attribution: "Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade"
});
//make an occurrence layer for macropus
var macropus = L.tileLayer.wms(
"https://records-ws.nbnatlas.org/ogc/wms/reflect", {
//"https://records-ws.nbnatlas.org/mapping/wms/reflect", {
q : "Vulpes vulpes",
layers: 'ALA:occurrences',
format: 'image/png',
transparent: true,
attribution: "Atlas of Living Australia",
bgcolor:"0x000000",
ENV: "colourmode:osgrid;color:ffff00;name:circle;size:4;opacity:0.5;gridlabels:true;gridres:singlegrid"
});
//make a map and add the layers
var map = L.map('map', {
center: [56.6,-4.0],
zoom: 6,
layers: [minimal, macropus]
});
</script>
</body>
</html>