A simple JavaScript app showcasing some features of Cesium, the open-source WebGL virtual globe and map engine. Learn more about this code by reading our associated tutorial.
Cesium version: 1.45.
License: Apache 2.0. Free for commercial and non-commercial use. See LICENSE.md.
This application is intended to introduce the main features of Cesium in context, but it is by no means exhaustive. Feel free to fork and modify this example however you'd like.
This app comes with a simple server (server.js
), but can be served through any means.
To use the packaged server:
- Install node.js
- From the
cesium-workshop
root directory, run
npm install
npm start
Browse to http://localhost:8080/
Have python installed? If so, from the
cesium-workshop
root directory runpython -m SimpleHTTPServer 8080
(Starting with Python 3, use
python -m http.server 8080
).Browse to
http://localhost:8080/
- index.html - A simple HTML page. Run a local web server, and browse to index.html to run your app, which will show our sample application.
- Source - Contains App.js which is referenced from index.html. This is where the app's code goes.
- ThirdParty - A directory for third-party libraries, which here includes just Cesium.
- server.js - A simple node.js server for serving your Cesium app. See the Local server section.
- package.json - Dependencies for the node.js server.
- LICENSE - A license file already referencing Cesium as a third-party. This starter app is licensed with Apache 2.0 (free for commercial and non-commercial use). You can, of course, license your code however you want.
- .gitignore - A small list of files not to include in the git repo. Add to this as needed.
- Reference Documentation : A complete guide to the Cesium API containing many code snippets.
- Sandcastle : A live-coding environment with a large gallery of code examples.
- Tutorials : Detailed introductions to areas of Cesium development.
- Cesium Forum : A resource for asking and answering Cesium-related questions.