Go to Google Earth Home
Google Earth COM API Documentation Document Version: 1.0 - Last modified:


Google Earth COM API Documentation


Introduction

This document describes the features of the Google Earth COM API. The Google Earth COM API allows third party applications to query information from and send commands to Google Earth. Through IApplicationGE, applications can query the current viewport, control the 3D viewpoint, use KML features, and more.

This Google Earth COM API documentation package includes:

COM Registration

Before you can interface a 3rd party application with Google Earth through the COM API, you must install Google Earth on the computer where you intend to run the 3rd party application. The Google Earth COM interface is registered as part of the Google Earth installation process.

If, for some reason, you need to register the Google Earth COM API again, execute GoogleEarth.exe with "/RegServer" as a command line argument.
For instance, assuming GoogleEarth.exe is located in C:\Program Files\Google\Google Earth, use the following command line to register Google Earth's COM API:

"C:\Program Files\Google\Google Earth\googleearth.exe" /RegServer

To unregister the Google Earth COM API, use the following command:

"C:\Program Files\Google\Google Earth\googleearth.exe" /UnregServer

Sample Code

This code is not yet available.

Note About Backwards Compatibility

In all likelihood, future versions of the Google Earth COM API will be fully backwards compatible with the current version.

For users using the deprecated (and undocumented) KH version of the COM interface, the deprecated API is currently both binary and source code backwards compatible except for a special case mentioned below. However, the deprecated KH may be unsupported in the future. Therefore, be sure to write new code and update old code using the supported GE interface.

The special case that the deprecated KH interface is not currently backwards compatible is where the third party source code uses the #import directive to access the API. In which case, the third party binaries still work, but you must update the source code in one of the following ways:

Note:
The current GE API contains different interface and function names that the original KH API. Importantly, all functions and properties now start with an upper case character.


Google Earth
     
©2008 Google - Google Home - About Google