/cesium-workshop

Primary LanguageJavaScriptApache License 2.0Apache-2.0

cesium-workshop

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.36.

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.

Local server

A local HTTP server is required to run the app.

Have python installed? If so, from the cesium-workshop root directory run

python -m SimpleHTTPServer

(Starting with Python 3, use python -m http.server 8080).

Browse to http://localhost:8080/

No python? Use Cesium's node.js server.

  • Install node.js
  • From the cesium-workshop root directory, run
  • npm install
  • node server.js

Browse to http://localhost:8080/

What's here?

  • 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.

Cesium resources

  • 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.