Skip to content

Instantly share code, notes, and snippets.

@aleszu
Created July 5, 2017 01:24
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 aleszu/23eafba7bcdd8d3136abea1db8fdfc93 to your computer and use it in GitHub Desktop.
Save aleszu/23eafba7bcdd8d3136abea1db8fdfc93 to your computer and use it in GitHub Desktop.
map.on('style.load', function () {
map.addSource('buildings',
{"type": "vector",
"url": "THE TILESET URL"
});
map.addLayer({
'id': 'buildings',
'interactive': true,
'type': 'fill-extrusion',
'source': 'buildings',
'source-layer': 'super_new_join_finalgeojson',
'paint': {
'fill-extrusion-height': {
'property': 'altura',
'stops': [
[{zoom: 13, value: 0}, 0],
[{zoom: 13.5, value: 1000}, 0],
[{zoom: 17.5, value: 0}, 0],
[{zoom: 17.5, value: 1000}, 1000]
]
},
'fill-extrusion-color': {
'property': 'precio',
'stops': [
[0, '#e6e6e6'],
[700, '#ffffb2'],
[1754, '#fecc5c'],
[2233, '#fd8d3c'],
[2751, '#f03b20'],
[3683, '#bd0026']
]
},
'fill-extrusion-opacity': 0.9
}
}, 'road_major_label');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment