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

Imagery Layers Split sandcastle example throws error when loaded #6471

Closed
hanbollar opened this issue Apr 20, 2018 · 5 comments · Fixed by #6472
Closed

Imagery Layers Split sandcastle example throws error when loaded #6471

hanbollar opened this issue Apr 20, 2018 · 5 comments · Fixed by #6472
Labels
category - sandcastle good first issue An opportunity for first time contributors type - bug

Comments

@hanbollar
Copy link

hanbollar commented Apr 20, 2018

Imagery Layers Split

i was going through some sandcastle examples and when i got to the Imagery Layers Split one it threw the following error when it first loaded:
Uncaught ReferenceError: require is not defined (on line 8)

when i reloaded the page through directly clicking the link it worked fine though so I'm not entirely sure what happened...

@hanbollar hanbollar changed the title Imager Layers Split sandcastle example throws error when loaded Imagery Layers Split sandcastle example throws error when loaded Apr 20, 2018
@hpinkos
Copy link
Contributor

hpinkos commented Apr 20, 2018

@hanbollar I couldn't reproduce this locally. Did you run npm run build before running sandcastle?

@hpinkos
Copy link
Contributor

hpinkos commented Apr 20, 2018

Oh, nevermind. I think you linked the wrong example. There seems to be a problem with this one:
https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Imagery%20Layers%20Texture%20Filters.html&label=Beginner

@hpinkos
Copy link
Contributor

hpinkos commented Apr 20, 2018

@hanbollar you can fix this by replacing require.toUrl('Assets/Textures/NaturalEarthII') with Cesium.buildModuleUrl('Assets/Textures/NaturalEarthII')

Can you open a pull request please? Thanks for finding this error!

@hpinkos hpinkos added type - bug good first issue An opportunity for first time contributors category - sandcastle labels Apr 20, 2018
@hanbollar
Copy link
Author

hanbollar commented Apr 20, 2018

@hpinkos ok i'll follow up with a fixed pull request - thanks!

@hpinkos
Copy link
Contributor

hpinkos commented Apr 20, 2018

Thanks! Yeah it looks like it only causes a problem on the built version of Sandcastle, so it's good you were going through the website and stumbled across it =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category - sandcastle good first issue An opportunity for first time contributors type - bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants