Skip to content

Commit a60f5c6

Browse files
nicozinkgithub-actions[bot]
authored andcommitted
Ensure id and building_id values match by converting to numeric values (internal-8816)
GitOrigin-RevId: 60efba9d268e364795646141b8f0c7f59f215f8b
1 parent a976bd9 commit a60f5c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

3d-style/data/bucket/building_bucket.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ export class BuildingBucket implements BucketWithGroundEffect {
482482

483483
let buildingId: number | null = null;
484484
if (feature.properties && feature.properties.hasOwnProperty('building_id')) {
485-
buildingId = feature.properties['building_id'] as number;
485+
buildingId = Number(feature.properties['building_id']);
486486
if (disabledBuildings.has(buildingId)) {
487487
continue;
488488
}

src/data/bucket/fill_extrusion_bucket.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ class FillExtrusionBucket implements BucketWithGroundEffect {
905905
const centroid = new PartData();
906906
centroid.buildingId = featureId;
907907
if (feature.properties && feature.properties.hasOwnProperty('building_id')) {
908-
centroid.buildingId = feature.properties['building_id'] as number;
908+
centroid.buildingId = Number(feature.properties['building_id']);
909909
}
910910

911911
const base = this.layers[0].paint.get('fill-extrusion-base').evaluate(feature, {}, canonical);

0 commit comments

Comments
 (0)