Get property from geoJSON feature

I am testing the sandbox for the geoJSON import on my local machine (Cesium 1.96), but I am not able to get the value of a feature property as described there.

If I log the value as described (full_id is one of my properties) with


I get


I can get the actual value with


but I am not sure it is the correct way.

Hi @mioruggieroguida,

pls share some of your code with us, it’s hard to answer such a question without it.
E.g. when / where in your code you try to log the value?

Best, Lennart

Hi @lennart.imberg,

It is the same code from the sandbox, but with a different file (attached)
BeaconsfieldRoad.geojson (20.2 KB)

and console.log(; instead of / 50.0;

Here it is

Cesium.Ion.defaultAccessToken =

const viewer = new Cesium.Viewer("cesiumContainer");

let starting_coordinates = [51.6106269733474, -0.1459970790756092];{
  destination: Cesium.Cartesian3.fromDegrees(starting_coordinates[1], starting_coordinates[0], 1000),
  orientation: {
    heading: Cesium.Math.toRadians(0.0),
    pitch: Cesium.Math.toRadians(-55.0),
//Example 3: Apply custom graphics after load.
//Seed the random number generator for repeatable results.

const promise = Cesium.GeoJsonDataSource.load("BeaconsfieldRoad.geojson");
.then(function (dataSource) {

  //Get the array of entities
  const entities = dataSource.entities.values;

  const colorHash = {};
  for (let i = 0; i < entities.length; i++) {
    //For each entity, create a random color based on the state name.
    //Some states have multiple entities, so we store the color in a
    //hash so that we use the same color for the entire state.
    const entity = entities[i];
    const name =;
    let color = colorHash[name];
    if (!color) {
      color = Cesium.Color.fromRandom({
        alpha: 1.0,
      colorHash[name] = color;

    //Set the polygon material to our random color.
    entity.polygon.material = color;
    //Remove the outlines.
    entity.polygon.outline = false;

    //Extrude the polygon based on the state's population.  Each entity
    //stores the properties for the GeoJSON feature it was created from
    //Since the population is a huge number, we divide by 50.
    entity.polygon.extrudedHeight = / 50.0;
  .catch(function (error) {
    //Display any errrors encountered while loading.

I am using Cesium 1.96

<script src=""></script>
<link href="" rel="stylesheet" />

I’ve just checked with my own GeoJSON data and I have the same “problem”.
Are you creating your geoJSON with QGIS, too?

It looks like
A) … the GeoJsonDataSource.load promise does not handle the JSON object literal (thats where the properties inside the GeoJSON are) corectly, or

B) QGis does not create “Cesium-friendly” geojson.

So you have to use _value. (at least for now and in my opinion).

Best Lennart

1 Like


That file was generated with QGIS. I have also tested another file generated directly from spatialite with ExportGeoJSON2 and it is the same issue.

Just to add: the console.log() gets executet “inside” a promise, so maybe that is the problem. Sadly, im not overly familiar with JS promises. So maybe some others can help here?

Works as expected for me using Cesium 1.97 in Chrome 105.0.5195.102.