Skip to content

Instantly share code, notes, and snippets.

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/b290d84bab6204f00008 to your computer and use it in GitHub Desktop.
Save burritojustice/b290d84bab6204f00008 to your computer and use it in GitHub Desktop.
1939 treasure island topojson test
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
cameras:
perspective:
type: perspective
vanishing_point: [0, -500]
lights:
directional1:
type: directional
direction: [.1, .5, -1]
diffuse: .7
ambient: .5
styles:
buildings:
base: polygons
shaders:
blocks:
color: |
color.rgb *= vec3(min((v_world_position.z*.001 + .5),1.));
sources:
osm:
type: TopoJSON
url: //vector.mapzen.com/osm/all/{z}/{x}/{y}.topojson?api_key=vector-tiles-P6dkVl4
treasure:
type: TopoJSON
url: https://gist.githubusercontent.com/bcamper/5223e6ec399e71134478/raw/18b561b097462cbbbc01fbcdc6988de7ae31e719/1939%2520treasure%2520island%2520test.topojson
layers:
treasure-buildings:
data: { source: treasure }
draw:
polygons:
order: 50
color: [0.643, 0.000, 0.000]
extrude: function() { return parseFloat(feature.height) }
water:
data: { source: osm }
draw:
polygons:
order: 2
color: '#353535'
earth:
data: { source: osm }
draw:
polygons:
order: 0
color: '#555'
landuse:
visible: false
data: { source: osm }
draw:
polygons:
order: 1
color: '#666'
roads:
# data: { source: osm }
data: { source: treasure }
filter: { highway: true }
draw:
lines:
order: 2
color: '#777'
width: 5
buildings:
visible: false
data: { source: osm }
filter: { $zoom: { min: 14 } }
draw:
polygons:
order: 50
color: '#999'
extruded:
filter: { $zoom: { min: 15 } }
draw:
polygons:
style: buildings
extrude: function () { return feature.height > 0 || $zoom >= 16; }
road_labels:
# data: { source: osm, layer: roads }
# filter: { name: true, aeroway: false, tunnel: false, railway: false, not: { kind: rail } }
data: { source: treasure }
filter: { highway: true }
highway:
filter: { kind: highway, $zoom: { min: 7 } }
draw:
text:
font:
fill: white
typeface: 500 12px Helvetica
not_highway:
filter: { not: { kind: highway }, $zoom: { min: 13 } }
draw:
text:
font:
fill: white
typeface: 100 11px Helvetica
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment