Hello!
I have come up against a curious issue.
I am trying to add a czml data source into a plain Cesium viewer.
If I open up the Cesium sandcastle and copy the czml code into there, it shows the entities just fine on the view within the sandcastle. However, if I try to add the very same czml code to my own Cesium application, I get a DOMException as below:
DOMException [SyntaxError: “An invalid or illegal string was specified”
code: 12
nsresult: 0x8053000c
``
The code which I believe is causing the problem is below:
var czmlToAdd = JSON.parse(JSON.stringify(czml));
viewer.dataSources.add(Cesium.CzmlDataSource.load(czmlToAdd));
``
But like I say, if I pop the czmlToAdd variable contents into the sandbox, everything works just fine.
What could be causing the problem?
Thank you in advance,
Toby