Skip to content

Instantly share code, notes, and snippets.

@burritojustice
Last active June 15, 2017 19:17
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 burritojustice/7c8e19703e8dcaac6186b7e40aa2582a to your computer and use it in GitHub Desktop.
Save burritojustice/7c8e19703e8dcaac6186b7e40aa2582a to your computer and use it in GitHub Desktop.
fresh block
license: mit
<!DOCTYPE html>
<html lang="en">
<head>
<title>San Juan Island</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: [40.8041, -124.1506],
zoom: 15,
maxZoom: 20,
tangramOptions: {
scene: {
import: [
'https://mapzen.com/carto/refill-style/7/refill-style.zip',
'https://mapzen.com/carto/refill-style/7/themes/brown-orange.zip'],
global: { 'sdk_mapzen_api_key': 'mapzen-xxxxxx', 'sdk_building_extrude': 'false' }
} }
});
// Move zoom control to the top right corner of the map
map.zoomControl.setPosition('topright');
// Mapzen Search box
const geocoder = L.Mapzen.geocoder('mapzen-JA21Wes');
geocoder.addTo(map);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment