How to get the value of a property of a GeoJSON entity

Hello!

Imagine I have a GeoJSON stream, which contains this entry:

{
  "type":"Feature",
  "geometry":{"type":"Point","coordinates":[132.1567,43.3499]},
  "properties":
    {
      "modelFile":"\/models\/building_textures\/building_textures.gltf"
    },
  "id":"bm_55d3605ef5a502e86b05becf"
},

In my JavaScript code, that entity is represented in the entity variable below.

    scope.viewer.dataSources.add(dataSource);
    var entities = dataSource.entities.values;
    var colorHash = {};
    for (var i = 0; i < entities.length; i++) {
        var entity = entities[i];

How can I access the value of the "modelFile" property of the GeoJSON property?

Thanks in advance

Dmitri Pisarenko

Dmitri,

Only 20 minutes ago I added to the “access entity properties from CZML” post. Matt Amato helped me resolve this very question (I used CZML, but he-that-is-more-knowledgeable-than-I assures me that the approach is the same). Hope this is of use. Cheers, erik

Thanks!

Dmitri