Last active
March 2, 2017 03:47
-
-
Save rfriberg/ced082290d5142c50abd46d9a58ead5b to your computer and use it in GitHub Desktop.
San Juan Island - Tangram scene
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 lang="en"> | |
<head> | |
<title>San Juan Island - Tangram scene</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 english_camp = [48.5865, -123.1433]; | |
var map = L.Mapzen.map('map', { | |
center: english_camp, | |
zoom: 15, | |
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> |
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
# 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.yaml | |
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: 2px | |
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