Missing terrain in QuickStart

While going through the QuickStart guide, I tried opening the provided HTML file directly from my computer. The dashboard and buildings loaded correctly, but the terrain did not appear. It only showed up when I ran the file using VS Code as a server (using Live Preview).

Is this a known limitation, or am I missing something?

2 Likes

Hi and welcome to the Cesium community.

Can you let us know which quickstart guide you are referring to (was there a URL link)? Cesium has a number of products and we want to make sure we get you the right information for the product you are working with.

Hi, thank you for getting back to me.

Here is the link to the quick start: CesiumJS Quickstart – Cesium.

Additional info:

  • It works perfectly fine in sandcastle.
  • Errors that I can see through console:
    • Cesium.js:16359 Uncaught TypeError: Cannot read properties of null (reading ‘createElement’)
      CesiumQuickStart.html:1 Refused to cross-origin redirects of the top-level worker script.
      CesiumQuickStart.html:1 Refused to cross-origin redirects of the top-level worker script.
      Cesium.js:5193 Primitive outlines disable imagery draping

Thanks for that additional info. I’m going to move this thread to the CesiumJS group since it is related to that product. That will help get the right people looking at it.

1 Like

Hi @ArvydasSlekaitis ,

Thanks for your post. And apologies for the delayed response as you were bounced between forum categories.

You need to run a local development server (ie. localhost) to load the index.html file because CesiumJS loads external resources (like tiles, JSON, and WASM files) using HTTP requests, which are blocked by modern browsers when using the file:// protocol.

You can start a local dev server with the following steps

Please let us know if that makes sense and we would be happy to assist further if needed.
Best,
Luke

Hi, Luke,

Thank you for explanation and steps to start local dev server using Python!