Skip to content

Instantly share code, notes, and snippets.

@louh
Last active February 22, 2017 19:58
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 louh/c209ae0ccc424c74d64538ef88f891d4 to your computer and use it in GitHub Desktop.
Save louh/c209ae0ccc424c74d64538ef88f891d4 to your computer and use it in GitHub Desktop.
A `global.sdk_mapzen_api_key` set inside a scene file will be deleted by Mapzen.js
<!DOCTYPE html>
<html lang="en">
<head>
<title>My Web 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>
html, body { margin: 0; padding: 0; }
#map { height: 100%; width: 100%; position: absolute; }
</style>
</head>
<body>
<div id="map"></div>
<script>
var map = L.Mapzen.map('map', {
center: [40.7423, -74.1089],
zoom: 13.7507,
tangramOptions: {
scene: 'scene.yaml'
}
});
</script>
</body>
</html>
import: https://mapzen.com/carto/refill-style/refill-style.yaml
global:
sdk_mapzen_api_key: mapzen-xxxxxxx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment