Hey guys,
Lurker since January and finally I am posting my first question. It is very general.
Currently I have a couple satellites in orbit using a czml file. I am able to click on an icon button, which then shows/hides the path of the satellite. (Not the satellite, but an icon button located on the right side of the page) I want to show a description box trailing the satellite when the user wants to see the satellite orbit, and hide it when the user no longer wants to see the satellite orbit. Basically, user clicks on icon button, satellite orbit path and description box trailing satellite becomes visible. User clicks on icon button again (same one) to hide the satellite orbit path and the trailing description box.
I know that in cesium, (if you have infoBox set to true) you can just click on the entity and an info box (description) will show. However those are not the requirements I am supposed to fulfill (sadly).
I have attached a small snipet of my cesium directive code (using angular here) so you can get an idea of what is going on when a user clicks on an icon. The onclick button fires an event that contains the satellite id from the czml packet and then calls the function setSatelliteView.
function setSatelliteView(view :string){
// locates specific satellite in czml packet by its id and saves it in entity
var entity = viewerEntities.getById(view);
if (entity.path.show == false){
//if show orbit path set to false, make true
entity.path.show = new Cesium.ConstantProperty(true);
//TODO
}
else if (entity.path.show == true){
//if show orbit path set to true, make false
entity.path.show = new Cesium.ConstantProperty(false);
//TODO
}
}
I truly appreciate any help. I usually just try stuff out until something finally works, but I have a mid year demo next week and I’m stressed as heck! Any help will be greatly appreciated!