The Google Earth Browser Plug-in is a web browser plugin that allows users to navigate and explore geographic data on a 3D globe. The look and feel of the plugin is similar to the Google Earth application, thereby providing a similar user experience.
The Google Earth API is a JavaScript library that allows developers to add Earth plug-in objects to their sites. The API also provides programmatic access to the plug-in objects and the features inside of them. Web site developers can use the API to facilitate interaction between standard HTML elements and Earth plug-in instances.
Using the API you can draw markers and lines, drape images over the terrain, add 3D models, or load KML files, allowing you to build sophisticated 3D map applications. To see demonstrations of what the API and plug-in are capable of, visit the Earth API Examples section.
To use the Google Earth API on your site, you will first need a Google Maps API key. You may want to learn more about Maps API keys if you are unfamiliar with this system. You can then try out the Hello, Earth code sample or go straight to the Earth API Documentation section.
Subscribe to the Google Geo Developers Blog to get news about Google's various geo developer offerings.
To be notified when there are changes in the Earth API, please subscribe to the Google Earth API Notify group.
The Google Earth Plug-in currently supports the following operating systems:
The Google Earth Plug-in is currently available for the following web browsers:
Although the plugin and API may work correctly on other browsers that support NPAPI with npruntime extensions, these browsers are not officially supported.
The system requirements for the Google Earth Plug-in are the same as the system requirements for Google Earth.
Because the API is dynamically loaded via the Google AJAX API loader interface
(google.load), your site will automatically use the latest revision
for the requested major API version (currently version 1).
After installing the plug-in, users will receive updates automatically and without interruption as they become available.
First, see the instructions on getting started with the Earth API above.
Once you have the Earth plugin working on your site, you can use the
google.earth.fetchKml function to load any publicly accessible KML
file. For examples on how to use fetchKml, see below:
To 3D-enable your existing Maps API page, simply add the following line to your map initialization code.
map.addMapType(G_SATELLITE_3D_MAP);
This assumes that the map variable is an instance of the
google.maps.Map2 (GMap2) class. You should also ensure
that a google.maps.MapTypeControl (GMapTypeControl)
has been added to the map object so that users can switch to the 3D view.
The Terms of Service for the Google Earth API are the same as the Terms of Service for the Google Maps API.
Per Section 9.2 of the Terms of Service, developers must report whether their Earth API implementation uses a sensor to locate the user's device and show the location in Earth. An example of a sensor is the Geolocation module in Gears, which provides a latitude/longitude for a user based on their WIFI/GPS/Cell ID information.
To report whether or not your web site uses such a sensor, you can pass a
parameter to google.load as follows:
If your web site does use a sensor, use this call:
google.load("earth", "1", {"other_params":"sensor=true"});
Otherwise, use this call:
google.load("earth", "1", {"other_params":"sensor=false"});
Note that since the sensor parameter was only recently introduced, pre-existing sites will not be disabled for failing to define the parameter. Developers are required to start reporting the parameter as soon as possible, however.
If you receive an installation error that reads:
The Installer encountered an unknown error that failed the install. Contact the software manufacturer for assistance.
you can try installing the plug-in via the Mac OS X terminal (command line interface) by following the steps below:
sudo /usr/sbin/installer -pkg /Volumes/GoogleEarth-Mac-Plugin/GoogleEarthPlugin.mpkg -target /You may be asked for a password upon entering this command. If this is the case, type your Mac OS X password and press the return key.
Note: Your password will not be shown on the screen. If you make a mistake while typing your password, you can quit the Terminal application and start again.
You can uninstall the plug-in from Mac OS X by running the Google Earth Plug-in Uninstaller application bundled with the Mac installation package. The uninstaller can also be downloaded below:
| Title | Package | Size | MD5 Checksum |
|---|---|---|---|
| Google Earth Plug-in for Mac Uninstaller | GoogleEarth-Plugin-Uninstaller.dmg | 69,642 bytes | c89429071b05843368606bd00576b4a6 |
We maintain a list of feature requests at our public issue tracking page.
Before submitting a new feature request, search the list to see if someone has already submitted something similar. If so, you can 'vote' for the feature by clicking the star icon next to the feature summary. You will receive e-mail updates whenever any of your starred feature requests are updated.
To submit a new feature request, click the 'New Issue' link at the top of the issue list and choose 'Feature Request' as the Template.
Before reporting a bug, please post your findings at the Google Earth API discussion group. Unexpected behavior seemingly due to a bug is oftentimes actually a result of incorrect JavaScript syntax or API usage.
We maintain a list of bugs at our public issue tracking page.
To report a bug that isn't already filed, click the 'New Issue' link at the top of the issue list and choose 'Bug' as the Template.
Please post your question in the Google Earth API discussion group to get help from the Google Earth API developer community and the Earth API team.
For best results when requesting help, please keep the following in mind: