Flatten 3D buildings when rendering to remove artifacts
This commit is contained in:
parent
9603703908
commit
aa7ae575d0
1 changed files with 12 additions and 0 deletions
|
@ -263,6 +263,18 @@ module.exports = function(options, repo, params, id, publicUrl, dataResolver) {
|
||||||
styleJSON.glyphs = 'fonts://' + styleJSON.glyphs;
|
styleJSON.glyphs = 'fonts://' + styleJSON.glyphs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(styleJSON.layers || []).forEach(function(layer) {
|
||||||
|
if (layer && layer.paint) {
|
||||||
|
// Remove (flatten) 3D buildings
|
||||||
|
if (layer.paint['fill-extrusion-height']) {
|
||||||
|
layer.paint['fill-extrusion-height'] = 0;
|
||||||
|
}
|
||||||
|
if (layer.paint['fill-extrusion-base']) {
|
||||||
|
layer.paint['fill-extrusion-base'] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var tileJSON = {
|
var tileJSON = {
|
||||||
'tilejson': '2.0.0',
|
'tilejson': '2.0.0',
|
||||||
'name': styleJSON.name,
|
'name': styleJSON.name,
|
||||||
|
|
Loading…
Reference in a new issue