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.
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.
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
mapbox-gl-js version
3.28.1
Browser and version
151.0.7922.77
Expected behavior
feature property
building_iddoes not have any influence of any rendering when it is not used in style.So a
fill-extrusionlayer together with a terrain will be rendered as normal also if features hasbuilding_idas a string property.Actual behavior
Will show
fill-extrusionlayers with strange heights at tile borders when using it together with terrain. Height will be correct when i delete my propertybuilding_id, which is an string uuid.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
might be that it can be fixed by