Skip to content

Instantly share code, notes, and snippets.

@nateirwin
Created December 9, 2015 15:06
Show Gist options
  • Save nateirwin/6de0d9f09ade351d0042 to your computer and use it in GitHub Desktop.
Save nateirwin/6de0d9f09ade351d0042 to your computer and use it in GitHub Desktop.
body {
margin: 0;
padding: 0;
}
#map {
bottom: 0;
position: absolute;
top: 0;
width: 100%;
}
var NPMap = {
center: {
lat: 37.82551432799189,
lng: -119.57931518554688
},
div: 'map',
overlays: [{
attribution: 'Land Resources Division',
branch: 'gh-pages',
path: 'base_data/boundaries/parks/yose.topojson',
popup: {
title: 'Yosemite National Park'
},
repo: 'data',
style: 'parks',
type: 'github',
user: 'nationalparkservice'
}],
zoom: 10
};
(function () {
var s = document.createElement('script');
s.src = 'http://www.nps.gov/lib/npmap.js/2.0.0/npmap-bootstrap.js';
document.body.appendChild(s);
})();
<!DOCTYPE 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>GitHub Layer | Examples | NPMap.js</title>
<link href="github-layer.css" rel="stylesheet">
</head>
<body>
<div id="map"></div>
<script src="github-layer.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment