TerriaJS is a library for building rich, web-based geospatial data explorers. It uses Cesium for a full 3D experience. Think Google Earth, except it runs in a web browser without a plugin. It also uses Leaflet for a basic 2D experience on systems that can't run Cesium.
A live demo of an application built on TerriaJS can be found here: Australia's National Map
npm install terriajs
TerriaJS is composed of a number of CommonJS modules, making it easy to incorporate only the parts you need into your application. Building a TerriaJS application consists of three steps:
- Build the code with browserify (or a similar tool).
- Build the CSS with less.
- Copy the runtime resources to a directory accessible from your application's web server.
The entire process can be easily automated using gulp. See National Map's gulpfile.js for an example.
index.js requires-in various TerriaJS components and initializes the user interface.
index.less customizes various aspects of the appearance and @import
s the less files for the TerriaJS components that the application uses.
All assets in node_modules/terriajs/wwwroot
should be copied to [your app's web root directory]/build/TerriaJS
.