Based on the examples and the file Cesium/Apps/SampleData/simple.czml
, it is clear to me how to create a line between two static objects using Polyline. Is there a way to show a line between two moving objects?
The documentation here suggests no, since Polyline is not interpolatable.
If I'm not mistaken, you would pass the positions of the two moving objects as a PositionPropertyArray of ReferenceProperties. I was able to create a line between a moving object orbiting the earth and the position directly beneath it by creating two ReferenceProperty objects with the positions of the time dynamic objects and then initializing a PositionPropertyArray with the array of those two objects.
This was done using the Cesium API and a loaded .kml file, so it would be easier just to use the .czml API to pass the references like in the simple.czml example.
If I’m not mistaken, you would pass the positions of the two moving objects as a PositionPropertyArray of ReferenceProperties. I was able to create a line between a moving object orbiting the earth and the position directly beneath it by creating two ReferenceProperty objects with the positions of the time dynamic objects and then initializing a PositionPropertyArray with the array of those two objects.
This was done using the Cesium API and a loaded .kml file, so it would be easier just to use the .czml API to pass the references like in the simple.czml example.
I’m confused as to what that looks like in CZML. (I’m going to try to use the Python generator.) Based on simple.czml, I got this far:
“polyline” : {
“positions” : {
“references” :
I see what you’re saying about PositionPropertyArray. I found this other forum post. How do I figure out what to put in CZML to represent PositionPropertyArray?
Attached is a CZML file showing a line between two satellites.
Scott
SatSquared.czml (5.18 KB)
I haven't looked at Scott's CZML yet but you'd just put [entityId1#positionProperty, entityId2#positionProperty] in the references section. What this is doing is passing the two time dynamic positions as the two points of the polyline.