Last active
August 29, 2015 13:56
-
-
Save djtfmartin/8836012 to your computer and use it in GitHub Desktop.
ALA occurrence layer & Leafletjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Leaflet Quick Start Guide Example</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="http://leafletjs.com/dist/leaflet.css" /> | |
</head> | |
<body> | |
<div id="map" style=" height: 800px"></div> | |
<script src="http://leafletjs.com/dist/leaflet.js"></script> | |
<script> | |
var map = L.map('map').setView([ -23.6,133.6], 4); | |
//add a base layer | |
L.tileLayer('http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png', { | |
maxZoom: 18, | |
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://cloudmade.com">CloudMade</a>' | |
}).addTo(map); | |
//add an occurrence layer | |
L.tileLayer.wms("http://biocache.ala.org.au/ws/webportal/wms/reflect?q=genus:Macropus", { | |
layers: 'ALA:occurrences', | |
format: 'image/png', | |
transparent: true, | |
attribution: "Atlas of Living Australia", | |
bgcolor:"0x000000", | |
outline:"true", | |
ENV: "color:5574a6;name:circle;size:4;opacity:1" | |
}).addTo(map); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment