Skip to content

Instantly share code, notes, and snippets.

@dbabbs
Created March 5, 2019 19:02
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 dbabbs/29229b15bebd09f129b480caa7bb64d9 to your computer and use it in GitHub Desktop.
Save dbabbs/29229b15bebd09f129b480caa7bb64d9 to your computer and use it in GitHub Desktop.
cameras:
camera1:
type: perspective
sources:
xyz_osm:
type: MVT
url: https://xyz.api.here.com/tiles/osmbase/256/all/{z}/{x}/{y}.mvt
max_zoom: 16
layers:
rapid_bus:
data: { source: _rapid_bus }
draw:
lines:
color: '#000'
width: 25
order: 10000
rapid_transit:
data: { source: _rapid_transit }
draw:
lines:
color: 'green'
width: 25
order: 10000
street_car:
data: { source: _street_car }
draw:
lines:
color: 'blue'
width: 25
order: 10000
earth:
data: { source: xyz_osm }
draw:
polygons:
order: function() { return feature.sort_rank; }
color: 'white'
landuse:
data: { source: xyz_osm }
draw:
polygons:
order: function() { return feature.sort_rank; }
color: '#E9EEF1'
water:
data: { source: xyz_osm }
draw:
polygons:
order: function() { return feature.sort_rank; }
color: '#C3CDD4'
roads:
data: { source: xyz_osm }
filter:
not: { kind: [path, rail, ferry] }
draw:
lines:
order: function() { return feature.sort_rank; }
color: '#C3CDD4'
width: 8
cap: round
highway:
filter:
kind: highway
draw:
lines:
order: function() { return feature.sort_rank; }
color: '#CDDAE3'
width: [[5, 5000], [8, 800], [10, 200], [12, 100],[14,40], [18, 20]]
outline:
color: '#EEEEEE'
width: [[16, 0], [18, 1.5]]
minor_road:
filter:
kind: minor_road
draw:
lines:
order: function() { return feature.sort_rank; }
color: '#F8FAFB'
width: 5
buildings:
data: { source: xyz_osm }
draw:
polygons:
order: function() { return feature.sort_rank; }
color: '#E9EBEB'
3d-buildings:
filter: { $zoom: { min: 15 } }
draw:
polygons:
extrude: function () { return feature.height > 20 || $zoom >= 16; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment