Entity Collection items visibility

Hello everyone,

I am facing a rather peculiar problem, which I can't seem to understand.

I have a working build of cesium which I use for some test, and I have two versions running, one localy (using a chrome app server) and one on a remote server using iis. I make my test on the local version first and then upload the changes to the server.

Most things I am trying work fine, but there is an issue with some entities I am trying to add to the viewer. I have tried two tests.

1. Hardcoded array of labels when initializing the viewer:

  labels = [
    {
      position : new Cesium.Cartesian3.fromDegrees(23.737951, 38.084955, 300),
      text : "Acharnes"
    },
    {
      position : new Cesium.Cartesian3.fromDegrees(23.753403, 38.042054, 300),
      text : "Nea Ionia"
    },
    {
      position : new Cesium.Cartesian3.fromDegrees(23.762747, 38.026296, 500),
      text : "Dimotiko Gipedo Galatsiou"
    },
    {
      position : new Cesium.Cartesian3.fromDegrees(23.736491, 38.151805, 1400),
      text : "Parnitha"
    },
    {
      position : new Cesium.Cartesian3.fromDegrees(23.807945, 38.054328, 500),
      text : "Marousi"
    },
    {
      position : new Cesium.Cartesian3.fromDegrees(23.739514, 38.018306, 300),
      text : "Ano Patisia"
    },
  ];

later added to the viewer manually:

// Add labels to the scene
   for (var i = 0; i < labels.length; i++){
     viewer.entities.add({
       position : labels[i].position,
       label : { text: labels[i].text }
     });
   }

2. Add via KML:

var options = {
    camera : viewer.scene.camera,
    canvas : viewer.scene.canvas/*,
    clampToGround : true*/
};

viewer.dataSources.add(Cesium.KmlDataSource.load('../../data/test.kml', options));

The problem is this: when I load the viewer from the local server all entities appear normaly in the scene. But No entity appears in the scene when the page loads from the remote server.

I haven't been able to spot any differences while running the code with breakpoints or any errors. In fact, in both cases the loading completes normally, but in one case the data are rendered and in the other not.

Any help would be welcome.

Thank you!

In case someone else stumbles upon a similar problem, the issue was from IIS and web.config, that did not allow a requested approximateTerrainHeights.json file to be loaded.

This configuration solved the problem:
<?xml version="1.0" encoding="UTF-8"?>
  <configuration>
    <system.webServer>
      <staticContent>
        <mimeMap fileExtension=".kml" mimeType="vnd.google-earth.kml+xml" />
        <mimeMap fileExtension=".kmz" mimeType="vnd.google-earth.kmz" />
    <mimeMap fileExtension=".json" mimeType="application/json" />
      </staticContent>
    </system.webServer>
  </configuration>