Uncaught TypeError: Cannot read property 'ellipsoid' of undefined

Hello,
In one hand I want to check this example on my own computer:
http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Box.html&label=undefined
I download the code and try to run the example but the browser throw this error “Uncaught TypeError: Cannot read property ‘ellipsoid’ of undefined”.
If I change this line “var ellipsoid = viewer.scene.globe.ellipsoid;” for this other one “var ellipsoid = viewer.centralBody.ellipsoid;”, the example work fine.
On the other hand I download the code of this example (http://cesiumjs.org/d3cesium/)) and I launched on my computer but the browser throw the same error.
if I change scene.globe for centralBody in the code the error disappear but nothing proyected on the 3D terrain globe.

¿Why these codes run fine in a web but not on my computer? ¿How can I solve the problem of the ellipsoid to run as a web example?

Best regards,

Aritz

It looks like you are using a recent example with an older version of Cesium. In b28, “centralBody” was renamed to globe and moved to the Scene; the d3cesium example was recently updated to work with b28.

Alex

Hello Alex,

That was the problem, thank you!!!

Best regards,

Aritz

I met the same question. And the Cesium version is last,Please give me a demo for improt my webgl code .Thank you.

在 2014年5月21日星期三 UTC+8上午5:44:35,alegarreta写道:

Hi,

The above problem is very out of date. Can you provide a code sample and the error you are getting in the most recent version of Cesium? Maybe start a new thread.

Thanks,

Gabby