Skip to content

Instantly share code, notes, and snippets.

@hpanno
Last active January 2, 2017 23:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hpanno/eba3807b39646a8174c6233dcc95f4ea to your computer and use it in GitHub Desktop.
Save hpanno/eba3807b39646a8174c6233dcc95f4ea to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Fuel Reduction Map</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>
var map = L.Mapzen.map('map', {
center: [35.2828, -120.6596],
zoom: 11,
scene: 'scene.yaml',
});
// Mapzen search box
var geocoder = L.Mapzen.geocoder('mapzen-JA21Wes');
geocoder.setPosition('topright');
geocoder.addTo(map);
// Mapzen locator (i.e., Find my location)
var locator = L.Mapzen.locator();
locator.addTo(map);
// Mapzen hash (for deep linking to map location and state)
L.Mapzen.hash({
map: map,
geocoder: geocoder
});
</script>
</body>
</html>
import: https://mapzen.com/carto/walkabout-style-more-labels/walkabout-style-more-labels.yaml
sources:
projectpolygons_20161206:
type: GeoJSON
url: https://gist.github.com/hpanno/3b7279cc6a0d4565db330f8fb23e0694
layers:
# Project Polygons
projectpolygons_20161206:
data: { source: projectpolygons_20161206 }
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