Skip to content

Document how CESIUM_BASE_URL works and when to use it #8327

@OmarShehata

Description

@OmarShehata

From the discussion in #8314 (comment), if you're importing CesiumJS into your project as a module (so if you're not just including Cesium.js as a script tag), then you may need to set the CESIUM_BASE_URL as a global variable on the window object so that CesiumJS knows where to load assets like the worker scripts.

We should:

  1. Improve the error message you get when this needs to be set. Currently it just says Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL. but that doesn't tell you what the content of this global variable should be.

  2. Consider writing up a paragraph somewhere we can reference that explains why this needs to be set, which would be helpful for users trying to import CesiumJS in whatever module system or environment they happen to be using. ThreeJS has a nice section in their docs about the different ways you can import the library.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions