Skip to content

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

Description

@enersis-pst

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions