Quickstart for developers

WebGL Earth is prepared to be used on third-party websites and in projects developed by other people. The developers have two options how to use the source code of the WebGL Earth project for custom web applications, the API and the codebase:

JavaScript API: 3d globe for your own website

This is the traditional model of using an external JavaScript library, known from Google Maps API, Leaflet or OpenLayers, where a developer inserts a prepared file (such as "http://www.webglearth.com/v2/api.js") into the HTML header and then calls the publicly available JavaScript methods to embed and control an instance of the WebGL Earth in his own website with custom map data or markers.

With a few lines of code anybody can use the 3D planet from WebGL Earth project inside of his own web.

>>> Read more at: JavaScript API.

Standalone JavaScript applications compiled with WebGL Earth codebase

WebGL Earth is (thanks to the integration with Google Closure compiler) fully usable in a form of library, which you can compile together with your own complex JavaScript application. The shareable codebase of the WebGL Earth is available in the "we" directory.

The sources contain also an example of a standalone application - in the subtree "src-app". You know the application already from the live demo website at http://www.webglearth.com/. Feel free to customize it, modify or use the code for inspiration for your own online projects.

The steps you should follow to setup WebGL Earth development environment are described on Github repository:



There is also an separate older version of WebGL Earth available at: https://github.com/webglearth/webglearth and documented at http://data.webglearth.com/doc/

Comments