Last active
September 13, 2019 13:37
-
-
Save mapsmania/cc0d9091acb7632cbe3c61c7d78874b9 to your computer and use it in GitHub Desktop.
Leaflet with WMS
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>WMS example - Leaflet</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin=""/> | |
<script src="https://unpkg.com/leaflet@1.5.1/dist/leaflet.js" integrity="sha512-GffPMF3RvMeYyc1LWMHtK8EbPv0iNZ8/oTtHPx9/cc2ILxQ+u905qIwdpULaqDkyBKgOaB57QTMg7ztg8Jm2Og==" crossorigin=""></script> | |
<style> | |
html, body { | |
height: 100%; | |
margin: 0; | |
} | |
#map { | |
width: 600px; | |
height: 400px; | |
} | |
</style> | |
</head> | |
<body> | |
<div id='map'></div> | |
<script type="text/javascript"> | |
var map = L.map('map', { | |
center: [40.7504174,-73.9947391], | |
zoom: 13 }); | |
var wmsLayer = L.tileLayer.wms('https://cugir.library.cornell.edu:443/geoserver/cugir/ows?SERVICE=WMS&', { | |
layers: 'cugir009062' | |
}).addTo(map); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment