question about dependencies for getJson and processCzml

I am trying to use the processCzml function as the api documentation suggests, but having some issues. I either get

"Uncaught TypeError: Cannot call method 'getJson' of undefined "
or something like
"Core undefined" with the following code.

         var url = ‘http://localhost:8080/myapp/getCzml’;
         var dynamicObjectCollection = new Cesium.DynamicObjectCollection();
         Core.getJson(url).then(function(czml) {
         processCzml(czml, dynamicObjectCollection, url);
         });

I tried importing Core with the require statement (as Sandcastle examples show) but it still doesn't seem to get everything it needs. The documentation doesn't mention any dependencies to use the lines above, so I'm a bit confused as to why my code is still not configured properly. Any help would be appreciated.

- PC

Hi,

In AMD terms, “Core/getJson” is a “module”, and can be required in, whereas “Core” is a “package”, which is a directory containing modules. You don’t require Core as a dependency, instead you would require “Core/getJson”. Alternatively, the “Cesium” module includes everything in one module, like above where you are referencing Cesium.DynamicObjectCollection.

However, I checked and “getJson” doesn’t exist in the latest version of the code. The current version has Core/loadJson, but I don’t remember how long ago that changed. What Sandcastle example are you referring to?

The code I was using was taken from the processCZML API documentation. I guess it was outdated and I didn't realize it.

Thanks for your response.

- PC

You're right, the doc is still using the old function name. I'll fix the
example code. Sorry for the confusion!