Hi,
I’m just starting to master caesium and immediately ran into a problem: I can’t extrude buildings. I did it using the example from the sandcastle, but I can’t integrate the code
I would be very grateful if you could help with the problem. I am attaching a link to codepen.io
async function addBuildingGeoJSON() {
// Load the GeoJSON file from Cesium ion.
const geoJSONURL = await Cesium.IonResource.fromAssetId(2470752);
// Create the geometry from the GeoJSON, and clamp it to the ground.
const geoJSON = await Cesium.GeoJsonDataSource.load(geoJSONURL, { clampToGround: true });
// Add it to the scene.
const dataSource = await viewer.dataSources.add(geoJSON);
//extrudedHeight
const entities = dataSource.entities.values;
for (let i = 0; i < entities.length; i++) {
const entity = entities[i];
const name = entity.name;
entity.polygon.extrudedHeight = 10000;
});
// Move the camera so that the polygon is in view.
viewer.zoomTo(dataSource);
});
addBuildingGeoJSON();
Best,
Eugenia