I have a geojson with height informations in it. I tried adding the geojson to the scene using

var viewer = new Cesium.Viewer('cesiumContainer', {
sceneMode : Cesium.SceneMode.SCENE3D,
timeline : false,
animation : false

var dataSource = Cesium.GeoJsonDataSource.load('../../SampleData/Buildings_3D_Elevation.geojson');

I can view the data as below. What should be done to use the height information and view as 3D? enter image description here

2 Answers 2


You need to extrude polygons:

entity.polygon.extrudedHeight = entity.properties.your_height_field

You may need to loop over records, for example:

    var p = dataSource.entities.values;   
    for (var i = 0; i < p.length; i++) {
         p.polygon.extrudedHeight = entity.properties.your_height_field

The accepted answer is wrong. Here is the correct example:

<div id="cesiumContainer"></div>
    var viewer = new Cesium.Viewer('cesiumContainer');
    var dataSource = Cesium.GeoJsonDataSource.load('buildings.geojson').then(
        function(dataSource) {
            var p = dataSource.entities.values;
            for (var i = 0; i < p.length; i++) {
                p[i].polygon.extrudedHeight = 15; // or height property

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.