Google Earth API Opens the World to Browsers

Google recently announced the new Google Earth Browser Plug-in, which brings the rich mapping and interactivity of the Google Earth application directly into the web browser, "bringing the full power of Google Earth to the web, embeddable within your own we site." And along with the plug-in comes the new Google Earth API (profile).


With the Google Earth API, you can give visitors to your site control over a Google Earth "camera" that is embedded within their browser through the plug-in, one that currently works in IE6, IE7, and Firefox for Windows. The Earth your visitors see is one that you customize using the Google Earth API. With this new JavaScript API you can:

Control the camera; create lines, markers, and polygons; import 3D models from the web and overlay them anywhere on the planet. In fact, you can even overlay your content over different planets, stars, and galaxies by toggling Sky mode, letting you build 3D Google Sky mashups. You can also enable 3D buildings with a single line of JavaScript, attach JavaScript callbacks to mouse events, fetch KML data from the web, and more.

And besides the API, there's lots of power in using KML, the XML mark-up language for expressing geographic information. Here it lets you easily display data in Google Earth and Google Maps.

The Google Earth API Developer's Guide is the place to start for details on the API. You'll need to understand KML to take full advantage of the API's capabilities. See the Google Earth API Interfaces for a list of object interface declarations.

A great way to see what's possible with the Google Earth API and plug-in is to install the plug-in , then visit the Google Earth API Examples page. The Samples page provides 31 API code snippets, and lets you run the code and view the results. To see KML in action, visit the KML Playground. Want to test your global geographical knowledge? Take the Geo Whiz challenge.

John Hanke, Director, Google Earth and Maps, spoke recently about A new world unfolding, where something that might be termed the "geoweb" will continue to grow and evolve as people "figure out how 'earth browsers,' embedded maps, local search, geo-tagged photos, blogs, the traditional GIS world, wikis, and other user-generated geo content all interrelate."

And with over over 60 mapping-related APIs already, there's surely lots of interesting, valuable geoweb development to come.

Be sure to read the next API article: Build Weather Mashups, Win Prizes


Comments (4)