1. A concise explanation of the problem you're experiencing.
i create two cesium viewer in one page, i get the primitiveA use viewerA.scene.primitives.get(id) function,
but when i call viewerB.scene.primitives.add(primitiveA) there is no primitive display on viewerB
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
for (var i = 0; i < viewerA.scene.primitives.length; ++i) {
var p = viewerA.scene.primitives.get(i);
if (p) {
viewB.scene.primitives.add(p)
}
}
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
i create two cesium viewer in one page, and i want to synchronize two viewer's primitives
--- after i draw rectangle on viewer A use the scene.primitives , display the same rectangle on viewer B
i don't want to call the viewerB.scene.primitives.add function , because there will be much more oparation to synchronize .
4. The Cesium version you're using, your operating system and browser.
Cesium:1.43
OS:win10
browser: Chrome 70