#13712·mapbox-gl-js

"building_id" property will show fill-extrusion layer with wrong heights

Author: enersis-pstCreated Aug 12, 2026Updated Aug 14, 2026
Labelsbug :lady_beetle:auto-triaged

mapbox-gl-js version

3.28.1

Browser and version

151.0.7922.77

Expected behavior

feature property building_id does not have any influence of any rendering when it is not used in style. So a fill-extrusion layer together with a terrain will be rendered as normal also if features has building_id as a string property.

Image

Actual behavior

Will show fill-extrusion layers with strange heights at tile borders when using it together with terrain. Height will be correct when i delete my property building_id, which is an string uuid.

Image

looks like building_idis used internally and needs to be an number, otherwise breaks. https://github.com/mapbox/mapbox-gl-js/blob/v3.28.1/src/data/bucket/fill_extrusion_bucket.ts#L1080

        if (feature.properties && Object.hasOwn(feature.properties, 'building_id')) {
            centroid.buildingId = Number(feature.properties['building_id']);
        }

might be that it can be fixed by

  • also check if its an number
  • allow string
  • make the property key configable