Tuesday, September 26, 2006

GE COM API...beta

Hey, it's finally a beta, and documented. Cool! Still really limited, but if you want to control GE with another program, here you go.


The announcement...


Tom_C said...

What language can I use to call (interface) the GE COM API? Java?

Where can I download it? I went to the link of http://earth.google.com/comapi/
, but it contains only API documentations.

Thank you in advance.


Matt M said...


An API is simply a set of "public" named objects that you can create and access. These objects already exist inside of the Google Earth software. The API merely gives you the means to address those components. So, there's nothing to download. You just now have a documented way to call the code that runs google earth because the developers exposed some methods for external access.

The simplest way to get to these objects is through one of the Microsoft languages, Visual Basic, C#, etc. In the IDE, usually visual studio, you can pull up Google Earth object list. You can then write a program that can access and change the state of the running Google Earth application. The easiest way to see this if you don't have visual studio is to start the visual basic for applications editor in one of the microsoft office suite of programs and then use the object browser to look at the google earth objects. Before the API was documented, this was the only way to find out about it.

It is possible to get to these from Java, but you have to use either native OS calls from Java, or a Java-COM bridge such as j-integra.

Tom_C said...


Your comments help a lot. Although I have a .NET installed on my laptop, I use Java for application development. I will try the j-integra, as you suggested, first. If it does not work out, then I will try C++ then.