npmap.js
Version:
A JavaScript web mapping library, built as a Leaflet plugin, for the National Park Service.
69 lines (67 loc) • 1.55 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>CartoDB Layer | 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',
maxZoom: 13,
overlays: [{
attribution: 'NPMap Team',
name: 'Parks',
popup: {
description: {
format: 'table'
},
title: '{{alphacode}}'
},
styles: {
'fill': '#7c117c'
},
table: 'parks',
type: 'cartodb',
user: 'nps'
},{
attribution: 'NPMap Team',
name: 'Yellowstone Roads',
popup: {
description: {
format: 'table'
},
title: '{{name_segment}}'
},
styles: {
'stroke': '#d39800',
'stroke-opacity': 0.8,
'stroke-width': 3
},
table: 'roads',
type: 'cartodb',
user: 'nps-yell'
}]
};
(function() {
var s = document.createElement('script');
s.src = '../dist/npmap-bootstrap.js';
document.body.appendChild(s);
})();
</script>
</body>
</html>