I want to add and/or update entity positions (from czmlDataSource).
I have several czmlDataSources that are added to a dataSourceCollection ("Divisions", "Forts", etc which can be seen at www.geo-animate.com/CesiumScripts/battleForNormandy/animation.php).
I am using cartographicDegrees to control each entity via the position property.
1- If I want to add a new position to entity "123" of the "Divisions" czmlDataSource, do I simply process the new CZML position into the dataSourceCollection?
var divisionsDataSource = new Cesium.CzmlDataSource.process(newPosition);
viewer.dataSources.add(dataSourceCollection.add(newPositionDataSource));
2- If I want to update an existing position to entity "123" of the "Divisions" czmlDataSource, must I remove the existing "123" entity and replace it entirely? Or can I process new positions with exactly the same timeStamp to overwrite the existing entity positions?
I am running some test with multiple aircraft coordinates and would like the air craft icons to position themselves in the direction they are heading.. The following snippet works for a single aircraft icon when I use the getById
where 'Flight' is the ID of a single aircraft in the CZML stream. I would like to do this for all/multiple flight icons, not just the specified getById.
Is this possible in either the JavaScript HTML or in the CZML data feed?
You should be able to do this by looping through all the entities in your CZML and setting a velocity orientation property as you’ve done for that single entity. This Sandcastle has an example of looping through all the entities created from a dataSource and applying a color to them: