Created
August 20, 2015 20:26
-
-
Save nateirwin/86774e6f10f88f9b022e to your computer and use it in GitHub Desktop.
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
body { | |
margin: 0; | |
padding: 0; | |
} | |
#map { | |
bottom: 0; | |
position: absolute; | |
top: 0; | |
width: 100%; | |
} |
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
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 = 'http://www.nps.gov/lib/npmap.js/2.0.0/npmap-bootstrap.min.js'; | |
document.body.appendChild(s); | |
})(); |
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> | |
<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> | |
<link href="cartodb-layer.css" rel="stylesheet"> | |
</head> | |
<body> | |
<div id="map"></div> | |
<script src="cartodb-layer.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment