reload click button images billboard into entity

Hello,

In my code, i add multiple entities which contains a different images and positions. Than, I show and hide these entities using sandcastle toolbar buttons but when i click for the second time to show again the entities not showing.

My code is as follows:

var satellites = entities.add(new Cesium.Entity());

var satReq = new XMLHttpRequest();
satReq.open("GET", './ARGIS/satText.txt', true);
satReq.onload = function(e) {
  var satText = satReq.responseText;
  var lines = satText.split("\n");
  var count = lines.length;
  
  for (var i = 0; i < count; i++){
    var infoSat = lines[i].split(" ");
    var name = infoSat[0] + " " + infoSat[1];
    var lat = infoSat[2];
    var lon = infoSat[3];
    var status = infoSat[4];
    var description = '<p>\
      Latitude: ' + lat + '\
      Lonigitude: ' + lon + '\
    </p>\
    <p>\
      Status: ' + status + '\
    </p>';
    
    entities.add({
    parent: satellites,
    id: 'Satellite ' + name + ' Information ',
    position: Cesium.Cartesian3.fromDegrees(lat, lon, 1500000),
    billboard: {
      image : './GE_Images/Satellites/' + status + '.png',
      scale: 0.5
    },
    description: description
    });
    
  }

}
satReq.send();

//CODE TO SHOW AND HIDE ENTITIES
Sandcastle.addToolbarButton('Satellite Status', function(){
    satellites.show = !satellites.show;
});

Any solution?

Thanks in advance.

Hello,

What version of Cesium are you using? This sounds like a bug we fix in the latest version. Let me know if you are still having this problem with Cesium 1.27

Best,

Hannah