My favorites | Sign in
Logo
                
Code license: Apache License 2.0
Labels: Google
Show all Featured wiki pages:
GEarthExtensionsReference
People details
Project owners:
  api.roman.public

Utility libraries for the Google Earth API.

GEarthExtensions

GEarthExtensions is the main utility library in this project. Other libraries may sneak into this hosting project later, but GEarthExtensions will be the main focus.

Dependencies

Documentation

Usage

NOTE: make sure you're familiar with the Earth API's Hello Earth demo and perhaps even the other demos in the demo gallery.

First download the GEarthExtensions library and include it via a <script> tag:

<script src="http://www.example.com/static/js/extensions-0.1.2.pack.js"></script>

Make sure to enable GZip compression over HTTP in your web server configuration to get maximum compression.

Alternatively, you can link directly to an official release or if you like to live life on the edge, to the trunk. Note that you won't reap the benefits of GZip compression over HTTP if you do this.

Then, in your google.earth.createInstance success callback:

google.earth.createInstance(successCallback);

function successCallback(pluginInstance) {
  ge = pluginInstance;
  ge.getWindow().setVisibility(true);

  var gex = new GEarthExtensions(ge);
  gex.dom.addPointPlacemark(gex.util.getLookAt(), { name: 'Hello World!' });
}

Video

A video introducing the utility library from Google I/O 2009: