Skip to content

Commit

Permalink
Improve building extrusion (#809)
Browse files Browse the repository at this point in the history
  • Loading branch information
bchapuis authored Dec 4, 2023
1 parent 1764a6a commit 00e998e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion basemap/layers/building/extrusion.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down
4 changes: 4 additions & 0 deletions basemap/layers/building/tileset.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 00e998e

Please sign in to comment.