Skip to content

Instantly share code, notes, and snippets.

@rfriberg
Last active March 2, 2017 04:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rfriberg/639dcdbe116d4bd1898ed29c754023c3 to your computer and use it in GitHub Desktop.
Save rfriberg/639dcdbe116d4bd1898ed29c754023c3 to your computer and use it in GitHub Desktop.
San Juan National Historic Park
<!DOCTYPE html>
<html lang="en">
<head>
<title>San Juan National Historic Park</title>
<meta charset="utf-8">
<link rel="stylesheet" href="https://mapzen.com/js/mapzen.css">
<script src="https://mapzen.com/js/mapzen.min.js"></script>
<style>
#map {
height: 100%;
width: 100%;
position: absolute;
}
html,body{margin: 0; padding: 0}
</style>
</head>
<body>
<div id="map"></div>
<script>
// Mapzen API key (replace key with your own)
// To generate your own key, go to https://mapzen.com/developers/
L.Mapzen.apiKey = 'mapzen-JA21Wes';
var san_juan_island = [48.5326, -123.0879];
var map = L.Mapzen.map('map', {
center: san_juan_island,
zoom: 11,
scene: 'scene.yaml',
});
// Move zoom control to the top right corner of the map
map.zoomControl.setPosition('topright');
// Mapzen Search box (replace key with your own)
// To generate your own key, go to https://mapzen.com/developers/
var geocoder = L.Mapzen.geocoder('mapzen-JA21Wes');
geocoder.addTo(map);
</script>
</body>
</html>
# Import existing Mapzen basemap
# See additional basemaps at https://mapzen.com/documentation/mapzen-js/api-reference/#basemap-styles
import: https://mapzen.com/carto/refill-style/6/refill-style.zip
sources:
_nps_boundary:
type: GeoJSON
url: https://gist.githubusercontent.com/rfriberg/684645c22f495b4a46f29fb312b6d268/raw/843ed38a3920ed199082636fe198ba995f5cfc04/san_juan_nhp.geojson
layers:
# SJ National Historic Park layer
_national_park:
data: { source: _nps_boundary }
draw:
polygons:
color: '#BCE3B4'
order: global.sdk_order_under_roads_0 # 290 in Refill | see https://mapzen.com/documentation/cartography/api-reference/#basic-underlay
lines:
width: [[8, 0.5px], [18, 5px]]
color: '#518946'
order: global.sdk_order_under_roads_1 # 291 in Refill | see https://mapzen.com/documentation/cartography/api-reference/#basic-underlay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment