Display custom attributes for Cesium OSM Buildings

Hi,

I would like to add some custom attributes to Cesium OSM buildings and show them when the building is clicked.

So far, my understanding is that I would need to create a shapefile with the custom attributes linked to the buildings and then load the shapefile into the Cesium visualisation.

If this understanding is correct, what should the contents of the shapefile be?

Also, how would i then display the attributes when a building is clicked?

Hi,
You can go through addEventListener and get Cesium3DTileFeature by using use getFeature, use setProperty to set custom property.

Check this sandcastle example.

  • Regards

Thanks Jacky. I’ve seen this example. This example only shows how to get a feature when it is clicked. But my custom data is going to be in a different tileset and the building data is coming from the Cesium OSM buildings tileset. I’m unsure how to combine those two when displaying the info box.