npmap.js
Version:
A JavaScript web mapping library, built as a Leaflet plugin, for the National Park Service.
50 lines (48 loc) • 1.11 kB
HTML
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
<title>KML Layer (Clustered) | Examples | NPMap.js</title>
<style>
body {
margin: 0;
padding: 0;
}
#map {
bottom: 0;
position: absolute;
top: 0;
width: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
var NPMap = {
div: 'map',
overlays: [{
cluster: true,
popup: {
title: '{{alphacode}}'
},
type: 'kml',
url: 'data/national_parks.kml'
},{
cluster: true,
popup: {
title: '{{name}}'
},
type: 'kml',
url: 'http://www.nps.gov/npmap/support/library/examples/data/dc.kml'
}]
};
(function() {
var s = document.createElement('script');
s.src = '../dist/npmap-bootstrap.js';
document.body.appendChild(s);
})();
</script>
</body>
</html>