Skip to content

Instantly share code, notes, and snippets.

@donflopez
Last active January 31, 2017 11:57
Show Gist options
  • Save donflopez/ae47b6aecee96a2058e5538e530f580f to your computer and use it in GitHub Desktop.
Save donflopez/ae47b6aecee96a2058e5538e530f580f to your computer and use it in GitHub Desktop.
Race condition Tangram
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Race Condition Tangram</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.0.1/dist/leaflet.js"></script>
<script src="https://precog.mapzen.com/tangrams/tangram/selection-null/dist/tangram.debug.js" charset="utf-8"></script>
</head>
<body>
<div id="map"></div>
<script>
var map = window.L.map( 'map' );
map.setView( [40.18579800351785,-95.045989688719], 5 );
window.L.tileLayer( 'http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png', {
attribution: '<a href="http://carto.com">CARTO</a> <a href="http://openstreetmap.com">Open Street Maps</a> <a href="http://mapzen.com">Tangram</a> © 2016',
maxZoom: 18
} ).addTo( map );
map.setView( [40.18579800351785,-90.045989688719], 5 );
var scene = Tangram.leafletLayer({
scene: './scene.yaml'
}).addTo(map).scene;
setTimeout(function () {
scene.updateConfig();
}, 0);
</script>
</body>
</html>
global:
language: en
cameras:
flat:
type: flat
active: true
styles:
polygons_blend:
base: polygons
blend: overlay
lines_blend:
base: lines
blend: overlay
points_blend:
base: points
blend: overlay
collide: false
scene:
animated: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment