From 00e998edbbf18667f671724565afeae44783df7d Mon Sep 17 00:00:00 2001 From: Bertil Chapuis Date: Mon, 4 Dec 2023 01:32:08 +0100 Subject: [PATCH] Improve building extrusion (#809) --- basemap/layers/building/extrusion.js | 5 ++++- basemap/layers/building/tileset.js | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/basemap/layers/building/extrusion.js b/basemap/layers/building/extrusion.js index f5ebe3055..697f28e6b 100644 --- a/basemap/layers/building/extrusion.js +++ b/basemap/layers/building/extrusion.js @@ -21,7 +21,10 @@ export default { type: 'fill-extrusion', source: 'baremaps', 'source-layer': 'building', - filter: ['!=', ['get', 'building'], 'no'], + filter: ['all', + ['!=', ['get', 'building'], 'no'], + ['!=', ['get', 'building:part'], 'no'] + ], layout: { visibility: 'visible', }, diff --git a/basemap/layers/building/tileset.js b/basemap/layers/building/tileset.js index 12c9a8b76..b57e588bb 100644 --- a/basemap/layers/building/tileset.js +++ b/basemap/layers/building/tileset.js @@ -27,6 +27,8 @@ export default { tags || jsonb_build_object('extrusion:base', CASE + WHEN tags ? 'min_height' + THEN convert_to_number(tags ->> 'min_height', 0) WHEN tags ? 'building:min_height' THEN convert_to_number(tags ->> 'building:min_height', 0) WHEN tags ? 'building:min_level' @@ -56,6 +58,8 @@ export default { tags || jsonb_build_object('extrusion:base', CASE + WHEN tags ? 'min_height' + THEN convert_to_number(tags ->> 'min_height', 0) WHEN tags ? 'building:min_height' THEN convert_to_number(tags ->> 'building:min_height', 0) WHEN tags ? 'building:min_level'