Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial does not work: you need to call CesiumWidget() first, then Viewer() #72

Open
eHanseJoerg opened this issue Jun 17, 2017 · 2 comments

Comments

@eHanseJoerg
Copy link

When trying to follow the tutorial within a Jupyter notebook, I noticed that I get an error:

import cesiumpy

v = cesiumpy.Viewer()
b = cesiumpy.Box(dimensions=(40e4, 30e4, 50e4), material=cesiumpy.color.RED, position=[-120, 40, 0])
v.entities.add(b)

Javascript error adding output!
ReferenceError: Cesium is not defined
See your browser Javascript console for more details.

If I do this instead:

import cesiumpy

v = cesiumpy.CesiumWidget()

v

Then I get the nice globe. If I now call the first code in a new cell once again, it will work just fine. Seems to me that the Viewer() method is not loading cesium.js correctly.

Using Firfox on Ubuntu 16.04.

See screenshots.
cesium1
cesium2

@dattanchu
Copy link

I am seeing the exact same issue. We should update the doc on the correct initialization order.

@astrojuanlu
Copy link

I think it's kind of random, sometimes it works with Viewer() just fine... (I reported this again in #77)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants